Skip to content

Commit

Permalink
switch tlsRequiredOption.String to use strconv.FormatInt
Browse files Browse the repository at this point in the history
This changes nothing output wise, but removes unnecessary code
and makes this method more generic for the future.
  • Loading branch information
twmb committed Dec 9, 2014
1 parent 4543f30 commit 0dcbef3
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions apps/nsqd/nsqd.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,7 @@ func (t *tlsRequiredOption) Set(s string) error {
func (t *tlsRequiredOption) Get() interface{} { return *t }

func (t *tlsRequiredOption) String() string {
switch *t {
case nsqd.TLSRequiredExceptHTTP:
return "1"
case nsqd.TLSRequired:
return "2"
}
return "0"
return strconv.FormatInt(int64(*t), 10)
}

func (t *tlsRequiredOption) IsBoolFlag() bool { return true }
Expand Down

0 comments on commit 0dcbef3

Please sign in to comment.