Skip to content

Instantly share code, notes, and snippets.

@morimolymoly
Created February 13, 2019 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morimolymoly/1377674580cd4cd570628c0060ec8a4c to your computer and use it in GitHub Desktop.
Save morimolymoly/1377674580cd4cd570628c0060ec8a4c to your computer and use it in GitHub Desktop.
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