boolflag removed

This commit is contained in:
alessio 2016-11-01 11:13:56 +01:00
parent efcd13f232
commit 43844a0df4
2 changed files with 3 additions and 11 deletions

View File

@ -44,9 +44,9 @@ func (h *Blueprint) Add(p *cli.Context) error {
Name: h.name(p), Name: h.name(p),
Path: filepath.Clean(p.String("path")), Path: filepath.Clean(p.String("path")),
Build: p.Bool("build"), Build: p.Bool("build"),
Bin: boolFlag(p.Bool("no-bin")), Bin: !p.Bool("no-bin"),
Run: boolFlag(p.Bool("no-run")), Run: !p.Bool("no-run"),
Fmt: boolFlag(p.Bool("no-fmt")), Fmt: !p.Bool("no-fmt"),
Test: p.Bool("test"), Test: p.Bool("test"),
Params: argsParam(p), Params: argsParam(p),
Watcher: Watcher{ Watcher: Watcher{

View File

@ -20,14 +20,6 @@ func argsParam(params *cli.Context) []string {
return nil return nil
} }
// BoolParam is used to check the presence of a bool flag
func boolFlag(b bool) bool {
if b {
return false
}
return true
}
// Duplicates check projects with same name or same combinations of main/path // Duplicates check projects with same name or same combinations of main/path
func duplicates(value Project, arr []Project) (Project, error) { func duplicates(value Project, arr []Project) (Project, error) {
for _, val := range arr { for _, val := range arr {