Call a function: Difference between revisions
Content added Content deleted
Line 1,831: | Line 1,831: | ||
a, b, c int |
a, b, c int |
||
} |
} |
||
func doIt(p Params) int { |
func doIt(p Params) int { |
||
return p.a + p.b + p.c |
return p.a + p.b + p.c |
||
} |
} |
||
func main() { |
func main() { |
||
fmt.Println(doIt(Params{a: 1, c: 9})) // prt 10 |
fmt.Println(doIt(Params{a: 1, c: 9})) // prt 10 |
||
Line 1,846: | Line 1,846: | ||
fmt.Printf("%d, %d, %d", a, b, c) |
fmt.Printf("%d, %d, %d", a, b, c) |
||
} |
} |
||
⚫ | |||
⚫ | |||
args := make(map[string]int) |
args := make(map[string]int) |
||
args["a"] = 3 |
args["a"] = 3 |