package main
import (
"fmt"
)
type options struct {
a int64
b string
c map[int]string
}
func (o *options) writeA(a int64) *options {
o.a = a
return o
}
func (o *options) writeB(b string) *options {
o.b = b
return o
}
func (o *options) writeC(c map[int]string) *options {
o.c = c
return o
}
func main() {
op := new(options)
op.writeA(int64(1)).writeB("test").writeC(make(map[int]string, 0))
fmt.Println(op.a, op.b, op.c)
}