Files
micro/runtime/builder/options.go
2020-09-15 17:26:27 +01:00

27 lines
501 B
Go

package builder
// Options to use when building source
type Options struct {
// Archive used, e.g. tar
Archive string
// Entrypoint to use, e.g. foo/main.go
Entrypoint string
}
// Option configures one or more options
type Option func(o *Options)
// Archive sets the builders archive
func Archive(a string) Option {
return func(o *Options) {
o.Archive = a
}
}
// Entrypoint sets the builders entrypoint
func Entrypoint(e string) Option {
return func(o *Options) {
o.Entrypoint = e
}
}