Skip to content

Commit

Permalink
decoder on string decode, accept floating point numbers and booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
langmartin committed Jun 10, 2019
1 parent 99e2f22 commit 1f63d5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ func (d *decoder) decodeString(name string, node ast.Node, result reflect.Value)
switch n := node.(type) {
case *ast.LiteralType:
switch n.Token.Type {
case token.NUMBER:
case token.NUMBER, token.FLOAT, token.BOOL:
result.Set(reflect.ValueOf(n.Token.Text).Convert(result.Type()))
return nil
case token.STRING, token.HEREDOC:
Expand Down

0 comments on commit 1f63d5f

Please sign in to comment.