parent
4c0a36e59a
commit
54ad9f0454
@ -1,15 +1,24 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"time"
|
||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main(){
|
func main() {
|
||||||
// map[KeyType]ValueType 集合类型
|
// map[KeyType]ValueType 集合类型
|
||||||
var personSalary map[string]int
|
var personSalary map[string]int
|
||||||
// go的三个引用类型 map slice chan
|
// go的三个引用类型 map slice chan
|
||||||
if personSalary == nil {
|
if personSalary == nil {
|
||||||
fmt.Println("map is nil. Going to make one.")
|
fmt.Println("map is nil. Going to make one.")
|
||||||
personSalary = make(map[string]int)
|
personSalary = make(map[string]int)
|
||||||
|
fmt.Printf(format string, a ...interface{})
|
||||||
|
time.Microsecond
|
||||||
|
fmt.Printf(format string, a ...interface{})
|
||||||
|
fmt.Print(a ...interface{})
|
||||||
|
time.Millisecond();
|
||||||
|
fmt.Print(a)
|
||||||
|
fmt.Println(a)
|
||||||
|
fmt.Printf(format, a)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue