Skip to content

Commit

Permalink
fix: trim space (#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryson-g authored Feb 15, 2025
1 parent 2b0c5e1 commit dd94014
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk-go/littlehorse/lh_variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/json"
"reflect"
"strconv"
"strings"

"github.com/littlehorse-enterprises/littlehorse/sdk-go/lhproto"
)
Expand Down Expand Up @@ -49,7 +50,7 @@ func StrToVarVal(input string, varType lhproto.VariableType) (*lhproto.VariableV

case lhproto.VariableType_BOOL:
var tmp bool
tmp, err = strconv.ParseBool(input)
tmp, err = strconv.ParseBool(strings.TrimSpace(input))
if err == nil {
out.Value = &lhproto.VariableValue_Bool{Bool: tmp}
}
Expand Down

0 comments on commit dd94014

Please sign in to comment.