runtime/builder with golang implementation (#2003)

This commit is contained in:
ben-toogood
2020-09-15 17:26:27 +01:00
committed by GitHub
parent 35349bd313
commit 8fdc8f05ce
4 changed files with 372 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
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
}
}