Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String configs that look like numbers can get corrupted on parse #24

Closed
tsholmes opened this issue May 23, 2018 · 1 comment
Closed

Comments

@tsholmes
Copy link

Sample case:

package main

import (
	"fmt"

	"github.com/segmentio/conf"
)

func main() {
	var config struct {
		StringValue string `conf:"string-value"`
	}

	conf.LoadWith(&config, conf.Loader{
		Args: []string{"-string-value", "0123456789"},
	})

	fmt.Println(config.StringValue)
}

Outputs:

1.23456789e+08
@nickatsegment
Copy link

Fixed by 312d8ed?w=1 probably

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants