From 076e26d30f4589dd7a7bc8968cfd27c2cfb110c5 Mon Sep 17 00:00:00 2001 From: Andy Hamilton Date: Mon, 22 Jul 2013 14:35:56 +0100 Subject: [PATCH] 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 --- context.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/context.go b/context.go index 6c4cbad..4207204 100644 --- a/context.go +++ b/context.go @@ -61,18 +61,18 @@ func (c *Context) lookupInt(name string, set *flag.FlagSet) int { return 0 } return val - } else { - return 0 } + + return 0 } func (c *Context) lookupString(name string, set *flag.FlagSet) string { f := set.Lookup(name) if f != nil { return f.Value.String() - } else { - return "" } + + return "" } 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 val - } else { - return false } + + return false }