go-envconfig
A Go library for parsing struct tags from environment variables. (by sethvargo)
xflags
Expressive flags for Go (by cavaliergopher)
Our great sponsors
go-envconfig | xflags | |
---|---|---|
6 | 1 | |
939 | 17 | |
- | - | |
6.4 | 0.0 | |
about 1 month ago | 12 months ago | |
Go | Go | |
Apache License 2.0 | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
go-envconfig
Posts with mentions or reviews of go-envconfig.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-03.
- PHP to Golang
-
Beginner-friendly API made with Go following hexagonal architecture.
Also, I put config in the package that needs it using something like this instead of Viper: https://github.com/sethvargo/go-envconfig And then at the entry point make another config that includes all the structs from the packages and inject them after bulk reading in. The beauty of this is I can take a package for reuse and drop it into another project. It’s errors and config are right there with it. Also this reduces cognitive load of trying to find everything in big projects (or dig through a 1000 lines in a centralized location).
- An Efficient Struct Configuration Pattern For Golang
- 'Discoverable' Environment Variables for Configuration
-
Loading environment variables properly in Go with env and gotdotenv
Env files are horrible. I recommend https://github.com/sethvargo/go-envconfig
- I'm looking for a good alternativ to Viper
xflags
Posts with mentions or reviews of xflags.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-01-16.
-
I'm looking for a good alternativ to Viper
Self promo: it won’t help with the config file side of things but should elegantly cover the flags and environment variables: https://github.com/cavaliergopher/xflags.
What are some alternatives?
When comparing go-envconfig and xflags you can also consider the following projects:
conf - Package conf provides support for using environmental variables and command line arguments for configuration.
ff - Flags-first package for configuration
godotenv - A Go port of Ruby's dotenv library (Loads environment variables from .env files)
cleanenv - ✨Clean and minimalistic environment configuration reader for Golang
env - A simple and zero-dependencies library to parse environment variables into structs
go-yamlcfg
urfave/cli - A simple, fast, and fun package for building command line apps in Go
copre - A small library to load configuration from multiple sources with predefined precedence