initial makefile (#7)

* adds initial makefile

Signed-off-by: Mike Brown <brownwm@us.ibm.com>

* clean up lint

Signed-off-by: Mike Brown <brownwm@us.ibm.com>

* presume path is set to contain gomealinter

Signed-off-by: Mike Brown <brownwm@us.ibm.com>

* addresses requested improvements

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown
2017-04-18 21:17:14 -05:00
committed by GitHub
parent b5734373c4
commit 11ba1cb54d
6 changed files with 158 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ type CRIContainerdOptions struct {
ContainerdConnectionTimeout time.Duration
}
// NewCRIContainerdOptions returns a reference to CRIContainerdOptions
func NewCRIContainerdOptions() *CRIContainerdOptions {
return &CRIContainerdOptions{}
}
@@ -47,6 +48,10 @@ func (c *CRIContainerdOptions) AddFlags(fs *pflag.FlagSet) {
2*time.Minute, "Connection timeout for containerd client.")
}
// InitFlags must be called after adding all cli options flags are defined and
// before flags are accessed by the program. Ths fuction adds flag.CommandLine
// (the default set of command-line flags, parsed from os.Args) and then calls
// pflag.Parse().
func InitFlags() {
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()