摘要:
package main import "fmt" type User struct { ID int FirstName string LastName string Email string } func main() { u := User{ID: 1, FirstName: "Z", Las 阅读全文
摘要:
file: utils/math.go package utils import ( "fmt" ) func printNum(num int) { fmt.Println("Current number is: ", num) } // Add multi int number together 阅读全文
摘要:
Create a new folder utilswith a new file math.go package utils import ( "fmt" ) func printNum(num int) { fmt.Println("Current number is: ", num) } // 阅读全文
摘要:
A Go map type looks like this: map[KeyType]ValueType This variable m is a map of string keys to int values: var m map[string]int Map types are referen 阅读全文
摘要:
An array has a fixed size. A slice, on the other hand, is a dynamically-sized, flexible view into the elements of an array. In practice, slices are mu 阅读全文