Skip to content

Commit

Permalink
clean up code and print Version instead of Build
Browse files Browse the repository at this point in the history
  • Loading branch information
Slack Security Team committed Nov 28, 2019
1 parent 3fe99aa commit a5814be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/nebula-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func main() {
flag.Parse()

if *printVersion {
fmt.Printf("Build: %s\n", Build)
fmt.Printf("Version: %s\n", Build)
os.Exit(0)
}

Expand Down
6 changes: 1 addition & 5 deletions cmd/nebula-service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ type program struct {
func (p *program) Start(s service.Service) error {
logger.Info("Nebula service starting.")
p.exit = make(chan struct{})

// Start should not block. Do the actual work async.
// Start should not block.
go p.run()
return nil
}
Expand All @@ -33,7 +32,6 @@ func (p *program) run() error {
}

func (p *program) Stop(s service.Service) error {
// Any work in Stop should be quick, usually a few seconds at most.
logger.Info("Nebula service stopping.")
close(p.exit)
return nil
Expand Down Expand Up @@ -82,7 +80,6 @@ func doService(configPath *string, configTest *bool, build string, serviceFlag *
}
}()

//if len(*serviceFlag) != 0 {
switch *serviceFlag {
case "run":
err = s.Run()
Expand All @@ -96,7 +93,6 @@ func doService(configPath *string, configTest *bool, build string, serviceFlag *
log.Fatal(err)
}
return
//}
}

}

0 comments on commit a5814be

Please sign in to comment.