Created
February 13, 2019 11:40
-
-
Save morimolymoly/1377674580cd4cd570628c0060ec8a4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type helloObject struct { | |
Otakebi string | |
Name string | |
} | |
func returnHello() string { | |
return "uooo" | |
} | |
func test() helloObject { | |
ret := helloObject{} | |
defer func() { | |
ret.Otakebi = returnHello() | |
}() | |
ret.Name = "yaju" | |
return ret | |
} | |
func main() { | |
fmt.Println("Hello, playground") | |
h := test() | |
fmt.Printf("%#v\n", h) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment