3 ms·
It makes sense if you're used to Go. In Go, in function declarations return types come after the argument list, e.g: func doSomething(input string) string
by DrJokepu 11y ago
It makes sense if you're used to Go. In Go, in function declarations return types come after the argument list, e.g:
func doSomething(input string) string { ... }
The go map declaration syntax is analogous to the function declaration syntax: the keyword (map, analogous to the func keyword) followed by the type of the keys in brackets (analogous to the argument type in parentheses) followed by the type of the values (analogous to the return type).
- socceroos 11y agoI've never seen that explained so succinctly. Thank you.