feat: update
This commit is contained in:
@@ -78,6 +78,10 @@ func Command(opt ...Option) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func Arguments(f func(cmd *cobra.Command)) Option {
|
||||
return f
|
||||
}
|
||||
|
||||
func Version(ver string) Option {
|
||||
return func(cmd *cobra.Command) {
|
||||
cmd.Version = ver
|
||||
|
||||
@@ -52,7 +52,14 @@ type ProviderContainer struct {
|
||||
|
||||
type Providers []ProviderContainer
|
||||
|
||||
func (p Providers) With(pcs ...Providers) Providers {
|
||||
func (p Providers) With(pcs ...func(...opt.Option) error) Providers {
|
||||
for _, pc := range pcs {
|
||||
p = append(p, ProviderContainer{Provider: pc})
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
func (p Providers) WithProviders(pcs ...Providers) Providers {
|
||||
for _, pc := range pcs {
|
||||
p = append(p, pc...)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package contracts
|
||||
|
||||
type HttpRoute interface{}
|
||||
|
||||
type HttpService interface {
|
||||
Serve() error
|
||||
GetEngine() interface{}
|
||||
type HttpRoute interface {
|
||||
Register() error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user