2021-07-05から1日間の記事一覧
こういうやつ type Closer struct{ Value string } func (c *Closer) Close(id string) { fmt.Printf("Closed(%s): %p\n", id, c) } func newCloser(c *Closer) { n := &Closer{Value: "aaa"} fmt.Printf("New: %p\n", n) c = n } func main() { c := &Close…