Cleans up some code

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
This commit is contained in:
JoshVanL 2020-03-24 08:46:33 +00:00
parent 991040238f
commit c7910ce3db
No known key found for this signature in database
GPG Key ID: E7A7196576A219DA
2 changed files with 2 additions and 4 deletions

View File

@ -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)

View File

@ -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
}