chore: fix type conversion
This commit is contained in:
parent
704861271e
commit
de049f7084
1 changed files with 2 additions and 2 deletions
|
|
@ -29,7 +29,7 @@ func NewConvertFromConfig(other map[string]interface{}) (Provider, error) {
|
|||
var _ SetFloatProvider = (*convertProvider)(nil)
|
||||
|
||||
func (o *convertProvider) FloatSetter(param string) (func(float64) error, error) {
|
||||
if o.Convert == "float2int" {
|
||||
if o.Convert != "float2int" {
|
||||
return nil, fmt.Errorf("convert: invalid conversion: %s", o.Convert)
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ func (o *convertProvider) FloatSetter(param string) (func(float64) error, error)
|
|||
var _ SetIntProvider = (*convertProvider)(nil)
|
||||
|
||||
func (o *convertProvider) IntSetter(param string) (func(int64) error, error) {
|
||||
if o.Convert == "int2float" {
|
||||
if o.Convert != "int2float" {
|
||||
return nil, fmt.Errorf("convert: invalid conversion: %s", o.Convert)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue