0
0
mirror of https://github.com/thegeeklab/github-releases-notifier.git synced 2024-11-14 18:10:40 +00:00
github-releases-notifier/vendor/github.com/alexflint/go-scalar
2017-08-08 12:40:09 +02:00
..
LICENSE Vendor all deps 2017-08-08 12:40:09 +02:00
README.md Vendor all deps 2017-08-08 12:40:09 +02:00
scalar.go Vendor all deps 2017-08-08 12:40:09 +02:00

GoDoc Build Status Coverage Status Report Card

Scalar parsing library

Scalar is a library for parsing strings into arbitrary scalars (integers, floats, strings, booleans, etc). It is helpful for tasks such as parsing strings passed as environment variables or command line arguments.

go get github.com/alexflint/go-scalar

The main API works as follows:

var value int
err := scalar.Parse(&value, "123")

There is also a variant that takes a reflect.Value:

var value int
err := scalar.ParseValue(reflect.ValueOf(&value), "123")