config flag fixed
This commit is contained in:
parent
a0aace6733
commit
55ce5f2be4
4
main.go
4
main.go
|
@ -70,7 +70,7 @@ func main() {
|
||||||
&cli.BoolFlag{Name: "run", Usage: "Disable go run"},
|
&cli.BoolFlag{Name: "run", Usage: "Disable go run"},
|
||||||
&cli.BoolFlag{Name: "bin", Usage: "Disable go install"},
|
&cli.BoolFlag{Name: "bin", Usage: "Disable go install"},
|
||||||
&cli.BoolFlag{Name: "fmt", Usage: "Disable gofmt"},
|
&cli.BoolFlag{Name: "fmt", Usage: "Disable gofmt"},
|
||||||
&cli.BoolFlag{Name: "config", Usage: "If there is a config file with a project for the current directory take that configuration"},
|
&cli.BoolFlag{Name: "config", Value: false, Usage: "If there is a config file with a project for the current directory take that configuration"},
|
||||||
},
|
},
|
||||||
Action: func(p *cli.Context) error {
|
Action: func(p *cli.Context) error {
|
||||||
y := r.New(p)
|
y := r.New(p)
|
||||||
|
@ -88,7 +88,7 @@ func main() {
|
||||||
Aliases: []string{"a"},
|
Aliases: []string{"a"},
|
||||||
Usage: "Add another project",
|
Usage: "Add another project",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
&cli.StringFlag{Name: "name", Aliases: []string{"n"}, Value: wd(),Usage: "Project name \t"},
|
&cli.StringFlag{Name: "name", Aliases: []string{"n"}, Value: wd(), Usage: "Project name \t"},
|
||||||
&cli.StringFlag{Name: "path", Aliases: []string{"b"}, Value: "/", Usage: "Project base path \t"},
|
&cli.StringFlag{Name: "path", Aliases: []string{"b"}, Value: "/", Usage: "Project base path \t"},
|
||||||
&cli.BoolFlag{Name: "build", Value: false, Usage: "Enable go build"},
|
&cli.BoolFlag{Name: "build", Value: false, Usage: "Enable go build"},
|
||||||
&cli.BoolFlag{Name: "run", Usage: "Disable go run"},
|
&cli.BoolFlag{Name: "run", Usage: "Disable go run"},
|
||||||
|
|
|
@ -45,7 +45,6 @@ func (h *Config) Fast(params *cli.Context) error {
|
||||||
fast := h.Projects[0]
|
fast := h.Projects[0]
|
||||||
// Takes the values from config if wd path match someone else
|
// Takes the values from config if wd path match someone else
|
||||||
if params.Bool("config") {
|
if params.Bool("config") {
|
||||||
fmt.Println(params.Bool("config"))
|
|
||||||
if err := h.Read(); err == nil {
|
if err := h.Read(); err == nil {
|
||||||
for _, val := range h.Projects {
|
for _, val := range h.Projects {
|
||||||
if fast.Path == val.Path {
|
if fast.Path == val.Path {
|
||||||
|
|
Loading…
Reference in New Issue