add Name func option

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-01-29 14:07:35 +03:00
parent 7af7649448
commit 125646d89b
8 changed files with 61 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ func NewOptions(opts ...Option) Options {
}
type Options struct {
Name string
// Issuer of the service's account
Issuer string
// ID is the services auth ID
@@ -63,6 +64,13 @@ func Addrs(addrs ...string) Option {
}
}
// Name sets the name
func Name(n string) Option {
return func(o *Options) {
o.Name = n
}
}
// Issuer of the services account
func Issuer(i string) Option {
return func(o *Options) {