Return

The return command prevents the execution of all statements that appear after it in the same function.


func A() string {
    return "Hello"

    // This second value will not be returned
    return "World"
}
                        
return.go