1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-05-25 21:53:14 +02:00
go-micro/cmd/gomu/generator/options.go
Niek den Breeje 5772697752
Make generator package a first class citizen (#2259)
There's really no point in having the `generator` be embedded in a
`file` package so we remove the `file` package and make the `generator`
package a first class citizen instead.
2021-09-10 13:31:52 +01:00

50 lines
653 B
Go

package generator
type Options struct {
Service string
Vendor string
Directory string
Client bool
Jaeger bool
Skaffold bool
}
type Option func(o *Options)
func Service(s string) Option {
return func(o *Options) {
o.Service = s
}
}
func Vendor(v string) Option {
return func(o *Options) {
o.Vendor = v
}
}
func Directory(d string) Option {
return func(o *Options) {
o.Directory = d
}
}
func Client(c bool) Option {
return func(o *Options) {
o.Client = c
}
}
func Jaeger(j bool) Option {
return func(o *Options) {
o.Jaeger = j
}
}
func Skaffold(s bool) Option {
return func(o *Options) {
o.Skaffold = s
}
}