Skip to content

Commit

Permalink
remove literal slice inits
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastiaanKlippert committed Feb 19, 2018
1 parent 323619c commit 86edf00
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ type stringOption struct {
}

func (so stringOption) Parse() []string {
args := []string{}
args := make([]string, 0)
if so.value == "" {
return args
}
Expand All @@ -169,7 +169,7 @@ type sliceOption struct {
}

func (so sliceOption) Parse() []string {
args := []string{}
args := make([]string, 0)
if len(so.value) == 0 {
return args
}
Expand All @@ -194,7 +194,7 @@ type mapOption struct {
}

func (mo mapOption) Parse() []string {
args := []string{}
args := make([]string, 0)
if mo.value == nil || len(mo.value) == 0 {
return args
}
Expand Down Expand Up @@ -224,7 +224,7 @@ type uintOption struct {
}

func (io uintOption) Parse() []string {
args := []string{}
args := make([]string, 0)
if io.isSet == false {
return args
}
Expand All @@ -249,7 +249,7 @@ type floatOption struct {
}

func (fo floatOption) Parse() []string {
args := []string{}
args := make([]string, 0)
if fo.isSet == false {
return args
}
Expand Down Expand Up @@ -408,7 +408,7 @@ func newTocOptions() tocOptions {
}

func optsToArgs(opts interface{}) []string {
args := []string{}
args := make([]string, 0)
rv := reflect.Indirect(reflect.ValueOf(opts))
if rv.Kind() != reflect.Struct {
return args
Expand Down

0 comments on commit 86edf00

Please sign in to comment.