Set package to micro
This commit is contained in:
16
options.go
16
options.go
@@ -1,4 +1,4 @@
|
||||
package gomicro
|
||||
package micro
|
||||
|
||||
import (
|
||||
"github.com/micro/cli"
|
||||
@@ -96,6 +96,13 @@ func Version(v string) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// Metadata associated with the service
|
||||
func Metadata(md map[string]string) Option {
|
||||
return func(o *Options) {
|
||||
o.Server.Init(server.Metadata(md))
|
||||
}
|
||||
}
|
||||
|
||||
func Flags(flags ...cli.Flag) Option {
|
||||
return func(o *Options) {
|
||||
o.Cmd.App().Flags = append(o.Cmd.App().Flags, flags...)
|
||||
@@ -108,13 +115,6 @@ func Action(a func(*cli.Context)) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// Metadata associated with the service
|
||||
func Metadata(md map[string]string) Option {
|
||||
return func(o *Options) {
|
||||
o.Server.Init(server.Metadata(md))
|
||||
}
|
||||
}
|
||||
|
||||
// Before and Afters
|
||||
|
||||
func BeforeStart(fn func() error) Option {
|
||||
|
Reference in New Issue
Block a user