Skip to content

Commit

Permalink
fixed arg casting
Browse files Browse the repository at this point in the history
  • Loading branch information
radutopala committed May 26, 2021
1 parent 6869466 commit e0ab4c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ func (arg Argument) Explain() string {

// String casts a value to a string and panics on failure.
func (arg Argument) String() string {
return *arg.Value.(*string)
return arg.Value.(string)
}

// Bool casts a value to a bool and panics on failure.
func (arg Argument) Bool() bool {
return *arg.Value.(*bool)
return arg.Value.(bool)
}

// Int casts a value to an int and panics on failure.
func (arg Argument) Int() int {
return *arg.Value.(*int)
return arg.Value.(int)
}

type sortArguments []*Argument
Expand Down

0 comments on commit e0ab4c7

Please sign in to comment.