remove FlagSet
kamilsk opened this issue · comments
Kamil Samigullin commented
- remove the method from interface https://github.com/kamilsk/semaphore/blob/1e58f96d738b1c6c0a130c7764cac3c67b70ea89/cmd/semaphore/cli.go#L28-L29
- extend the method to accept arguments https://github.com/kamilsk/semaphore/blob/1e58f96d738b1c6c0a130c7764cac3c67b70ea89/cmd/semaphore/cli.go#L35
- extend the method to return parsed arguments https://github.com/kamilsk/semaphore/blob/1e58f96d738b1c6c0a130c7764cac3c67b70ea89/cmd/semaphore/cli.go#L42
- these parts https://github.com/kamilsk/semaphore/blob/1e58f96d738b1c6c0a130c7764cac3c67b70ea89/cmd/semaphore/cli.go#L80 and https://github.com/kamilsk/semaphore/blob/1e58f96d738b1c6c0a130c7764cac3c67b70ea89/cmd/semaphore/cli.go#L105 should be removed
- these parts
if c.Flags == nil {
c.Flags = c.BaseCommand.FlagSet(c.CmdName)
c.Flags.BoolVar(&c.Edit, "edit", false, "switch to edit mode to read arguments from input (not implemented yet)")
}
return c.Flags
should be refactored to stateless