JMS #14: Moving toward having and app object

This commit is contained in:
Jeremy Saenz
2013-07-19 08:34:01 -07:00
parent 435c4d704c
commit 6664835bc1
8 changed files with 72 additions and 75 deletions

View File

@@ -10,12 +10,13 @@ import (
// can be used to retrieve context-specific Args and
// parsed command-line options.
type Context struct {
App *App
flagSet *flag.FlagSet
globalSet *flag.FlagSet
}
func NewContext(set *flag.FlagSet, globalSet *flag.FlagSet) *Context {
return &Context{set, globalSet}
func NewContext(app *App, set *flag.FlagSet, globalSet *flag.FlagSet) *Context {
return &Context{app, set, globalSet}
}
// Looks up the value of a local int flag, returns 0 if no int flag exists