Skip to content

Commit

Permalink
Some things needs to be seen closer to when they are used
Browse files Browse the repository at this point in the history
  • Loading branch information
NHOrus committed Apr 14, 2016
1 parent 2f7042f commit 7a824a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import (
flag "github.com/jessevdk/go-flags"
)

//Bool is a bool, because this is suggested method for go-flags to work with a boolean flag that could be flipped both ways
type Bool bool

//Config are concrete and stored in configuration file
type Config struct {
ImageDir string `long:"dir" description:"Target Directory" default:"img" ini-name:"downdir"`
Expand Down Expand Up @@ -160,9 +163,6 @@ func checkFlagError(err error) {
}
}

//Bool is a bool, because this is suggested method for go-flags to work with a boolean flag that could be flipped both ways
type Bool bool

//UnmarshalFlag implements flags.Unmarshaler interface for Bool
func (b *Bool) UnmarshalFlag(value string) error {
t, err := strconv.ParseBool(value)
Expand Down

0 comments on commit 7a824a8

Please sign in to comment.