boolflag removed
This commit is contained in:
parent
efcd13f232
commit
43844a0df4
|
@ -44,9 +44,9 @@ func (h *Blueprint) Add(p *cli.Context) error {
|
|||
Name: h.name(p),
|
||||
Path: filepath.Clean(p.String("path")),
|
||||
Build: p.Bool("build"),
|
||||
Bin: boolFlag(p.Bool("no-bin")),
|
||||
Run: boolFlag(p.Bool("no-run")),
|
||||
Fmt: boolFlag(p.Bool("no-fmt")),
|
||||
Bin: !p.Bool("no-bin"),
|
||||
Run: !p.Bool("no-run"),
|
||||
Fmt: !p.Bool("no-fmt"),
|
||||
Test: p.Bool("test"),
|
||||
Params: argsParam(p),
|
||||
Watcher: Watcher{
|
||||
|
|
|
@ -20,14 +20,6 @@ func argsParam(params *cli.Context) []string {
|
|||
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
|
||||
func duplicates(value Project, arr []Project) (Project, error) {
|
||||
for _, val := range arr {
|
||||
|
|
Loading…
Reference in New Issue