github.com/tickoalcantara12/micro/v3@v3.0.0-20221007104245-9d75b9bcbab9/service/build/options.go (about) 1 package build 2 3 // Options to use when building source 4 type Options struct { 5 // Archive used, e.g. tar 6 Archive string 7 // Entrypoint to use, e.g. foo/main.go 8 Entrypoint string 9 } 10 11 // Option configures one or more options 12 type Option func(o *Options) 13 14 // Archive sets the builders archive 15 func Archive(a string) Option { 16 return func(o *Options) { 17 o.Archive = a 18 } 19 } 20 21 // Entrypoint sets the builders entrypoint 22 func Entrypoint(e string) Option { 23 return func(o *Options) { 24 o.Entrypoint = e 25 } 26 }