github.com/goplus/gop@v1.2.6/printer/_testdata/40-Deduce-struct-type/deduce.gop (about) 1 type Config struct { 2 Dir string 3 Level int 4 } 5 6 type Result struct { 7 Text string 8 } 9 10 func foo(conf *Config) *Result { 11 println("conf:", *conf) 12 return {Text: "Hello, Go+"} 13 } 14 15 ret := foo({Dir: "/foo/bar", Level: 1}) 16 println(ret)