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.