Declare option not options
This commit is contained in:
@@ -27,7 +27,7 @@ type options struct {
|
||||
transport transport.Transport
|
||||
}
|
||||
|
||||
type Options func(*options)
|
||||
type Option func(*options)
|
||||
|
||||
var (
|
||||
Address string
|
||||
@@ -36,6 +36,12 @@ var (
|
||||
DefaultServer Server
|
||||
)
|
||||
|
||||
func Transport(t transport.Transport) Option {
|
||||
return func(o *options) {
|
||||
o.transport = t
|
||||
}
|
||||
}
|
||||
|
||||
func Init() error {
|
||||
defer log.Flush()
|
||||
|
||||
|
Reference in New Issue
Block a user