Update based on code review

This commit is contained in:
Ivan Kozlovic
2017-09-07 08:45:58 -06:00
parent 379a14b8cc
commit 684a2e4173
2 changed files with 3 additions and 5 deletions

View File

@@ -65,9 +65,7 @@ func usage() {
func main() {
// Create a FlagSet and sets the usage
fs := flag.NewFlagSet("nats-server", flag.ExitOnError)
fs.Usage = func() {
usage()
}
fs.Usage = usage
// Configure the options from the flags/config file
opts, err := server.ConfigureOptions(fs, os.Args[1:])

View File

@@ -1014,7 +1014,7 @@ func ConfigureOptions(fs *flag.FlagSet, args []string) (*Options, error) {
// Process signal control.
if signal != "" {
if err := processSignal(fs, signal); err != nil {
if err := processSignal(signal); err != nil {
return nil, err
}
}
@@ -1157,7 +1157,7 @@ func overrideCluster(opts *Options) error {
return nil
}
func processSignal(fs *flag.FlagSet, signal string) error {
func processSignal(signal string) error {
var (
pid string
commandAndPid = strings.Split(signal, "=")