Fixed the warnings on package install

The following warnings were being displayed when the package was installed/used:

/usr/lib/go/src/pkg/github.com/codegangsta/cli/context.go:56: function ends without a return statement
/usr/lib/go/src/pkg/github.com/codegangsta/cli/context.go:69: function ends without a return statement
/usr/lib/go/src/pkg/github.com/codegangsta/cli/context.go:78: function ends without a return statement
This commit is contained in:
Andy Hamilton 2013-07-22 14:35:56 +01:00
parent 84a2685b9c
commit 076e26d30f

View File

@ -61,18 +61,18 @@ func (c *Context) lookupInt(name string, set *flag.FlagSet) int {
return 0 return 0
} }
return val return val
} else {
return 0
} }
return 0
} }
func (c *Context) lookupString(name string, set *flag.FlagSet) string { func (c *Context) lookupString(name string, set *flag.FlagSet) string {
f := set.Lookup(name) f := set.Lookup(name)
if f != nil { if f != nil {
return f.Value.String() return f.Value.String()
} else {
return ""
} }
return ""
} }
func (c *Context) lookupBool(name string, set *flag.FlagSet) bool { func (c *Context) lookupBool(name string, set *flag.FlagSet) bool {
@ -83,7 +83,7 @@ func (c *Context) lookupBool(name string, set *flag.FlagSet) bool {
return false return false
} }
return val return val
} else {
return false
} }
return false
} }