Cleans up some code
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
This commit is contained in:
parent
991040238f
commit
c7910ce3db
@ -41,7 +41,7 @@ func main() {
|
||||
func SetupSignalHandler() (stopCh <-chan struct{}) {
|
||||
stop := make(chan struct{})
|
||||
c := make(chan os.Signal, 2)
|
||||
signal.Notify(c, []os.Signal{os.Interrupt, syscall.SIGTERM}...)
|
||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||
go func() {
|
||||
<-c
|
||||
close(stop)
|
||||
|
||||
@ -74,8 +74,6 @@ func (o *Options) Validate() error {
|
||||
|
||||
// Run executes version command
|
||||
func (o *Options) Run() error {
|
||||
var err error
|
||||
|
||||
versionInfo := util.VersionInfo()
|
||||
|
||||
switch o.Output {
|
||||
@ -103,5 +101,5 @@ func (o *Options) Run() error {
|
||||
return fmt.Errorf("VersionOptions were not validated: --output=%q should have been rejected", o.Output)
|
||||
}
|
||||
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user