[go-nuts] Re: What is the best way to represent functional options within factory methods?

2017-10-11 Thread Frank Ruiz
pe PluginOpt interface { pluginOpt() }. > > https://godoc.org/google.golang.org/grpc#CallOption > > On Wednesday, October 11, 2017 at 11:23:16 AM UTC-7, Frank Ruiz wrote: >> >> Greetings, >> >> Was hoping to solicit some feedback on utilizing functional options

[go-nuts] Re: What is the best way to represent functional options within factory methods?

2017-10-11 Thread Frank Ruiz
#CallOption > > On Wednesday, October 11, 2017 at 11:23:16 AM UTC-7, Frank Ruiz wrote: >> >> Greetings, >> >> Was hoping to solicit some feedback on utilizing functional options in >> conjunction with factory methods. >> >> I currently have the following

[go-nuts] What is the best way to represent functional options within factory methods?

2017-10-11 Thread Frank Ruiz
Greetings, Was hoping to solicit some feedback on utilizing functional options in conjunction with factory methods. I currently have the following function: func ProcPlugin(opts …func(*procStruct){ p := defaulProc for _, opt := range opts { opt(&p) } return &p, nil } I am now trying to general