Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 54ad9f0

Browse files
committed
Signed-off-by: Tinywan <756684177@qq.com>
1 parent 4c0a36e commit 54ad9f0

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

‎README.md‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,8 @@ $ go get github.com/Tinywan/golang-tutorial
7373
### 34 - 反射
7474
### 35 - 读文件
7575

76-
## 官方文档
76+
## 其他文档
7777

7878
* [如何编写Go代码](/docs/how_to_write_go_code.md)
79-
80-
###### HELP
8179
* [原文](https://golangbot.com/)
82-
* [译者一](http://blog.csdn.net/u011304970/article/details/74797939)
83-
* [译者二](https://www.studygolang.com/gctt/Noluye)
8480

85-
本文由 [GCTT](https://github.com/studygolang/GCTT) 原创翻译,[Go语言中文网](https://studygolang.com/)首发。

‎demo/point/map01.go‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
package main
22

33
import (
4+
"time"
45
"fmt"
56
)
67

7-
func main(){
8+
func main(){
89
// map[KeyType]ValueType 集合类型
9-
var personSalary map[string]int
10+
var personSalary map[string]int
1011
// go的三个引用类型 map slice chan
1112
if personSalary == nil {
1213
fmt.Println("map is nil. Going to make one.")
1314
personSalary = make(map[string]int)
15+
fmt.Printf(format string, a ...interface{})
16+
time.Microsecond
17+
fmt.Printf(format string, a ...interface{})
18+
fmt.Print(a ...interface{})
19+
time.Millisecond();
20+
fmt.Print(a)
21+
fmt.Println(a)
22+
fmt.Printf(format, a)
1423
}
15-
}
24+
}

‎demo/point/map02.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func main(){
3333
}else{
3434
fmt.Println(newEmp,"not found")
3535
}
36+
3637
fmt.Println("----------------遍历 map 中所有的元素---------------------")
3738
for key,value := range personSalary {
3839
fmt.Printf("personSalary[%s] = %d \n",key,value)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /