JeremyLoy Config Versions Save

12 factor configuration as a typesafe struct in as little as two function calls

v1.5.0

2 years ago
  • FromOptional(file) API for easier local dev without ignoring/parsing err

  • support for *url.URL fields

  • internal rearchitecture. If any bugs were introduced please open an issue.

v1.4.0

2 years ago

Adds new Sub method on Builder which populates the target struct starting at the provided prefix

v1.3.0

4 years ago

time.Duration values are now parsed using the time.ParseDuration ruleset!

v1.2.1

4 years ago

fixed bug where zero values for ints and bools would falsely error.

v1.2.0

4 years ago

Error handling!

To(*struct) now returns an error.

  • Bad file i/o no longer panics.
  • conversion errors are no longer ignored

I know this was a much requested feature, I too wanted idiomatic error handling. I just needed to sit on it a bit to find the right solution.

Hoping to improve it in the near future with a concrete and inspectable error type, keep an eye out for that.

v1.1.1

4 years ago

Clearer error messages Better handling of file i/o errors

v1.1.0

5 years ago
  • Added struct tag support!
type MyConfig struct {
  DatabaseURL string `config:"DATABASE_URL"`
}

v1.0.1

5 years ago
  • Fixed typo where Int16 was being parsed as Int26

v1.0.0

5 years ago

v1.0.0