Named Return Values
Go’s return values may be named. If so, they are treated as variables defined at the top of the function.
新しいことを始めるのに、遅すぎる挑戰はない
Go’s return values may be named. If so, they are treated as variables defined at the top of the function.
Go has built-in support for multiple return values
. This feature is used often in idiomatic Go, for example to return both result and error values from a function.
Multiple variables can be declared using a single statement.
We can use func
keyword to define a function.