Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge. Learn more →
Viper Alternatives
Similar projects and alternatives to viper
-
-
godotenv
A Go port of Ruby's dotenv library (Loads environment variables from .env files)
-
Onboard AI
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
-
koanf
Simple, extremely lightweight, extensible, configuration management library for Go. Support for JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.
-
envconfig
Small library to read your configuration from environment variables (by vrischmann)
-
kelseyhightower/envconfig
Golang library for managing configuration data from environment variables
-
Gin
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
-
Testify
A toolkit with common assertions and mocks that plays nicely with the standard library
-
InfluxDB
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
-
validator
:100:Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving
-
mapstructure
Go library for decoding generic map values into native Go structures and vice versa.
-
-
-
-
urfave/cli
A simple, fast, and fun package for building command line apps in Go (by urfave)
-
-
-
-
-
-
coral
Coral, a friendly Cobra fork with nearly all its features, but only 4 dependencies (by muesli)
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
viper reviews and mentions
- API completa em Golang - Parte 2
-
What 3rd-party libraries do you use often/all the time?
github.com/spf13/viper
- API completa em Golang - Parte 1
-
Building RESTful API with Hexagonal Architecture in Go
Instead of directly accessing environment variables with os.Getenv(), integrating a configuration handler like viper might make it maintainable.
-
What is the most common approach to configure a backend app?
I guess most people are using https://github.com/spf13/viper but I don't know if I should read everything from
-
Could I get a code review?
Use Viper for config file or environmental variable configuration -- it's going to save you a whole lot of time.
-
Which packages do you recommend for building cli tools?
Cobra and Viper.
-
Library for Python similar to Go's Viper / 12 Factor
I've mostly been using https://github.com/spf13/viper of late for my go projects. It supports the standard config formats, (json, yaml, toml etc) and lets you override any value with a ENV value.
-
Two ways to provide configuration: command-line, yaml file.
Not only that, the "unmarshall to struct" method doesn't work at all for environment variables. https://github.com/spf13/viper/issues/188
-
Tools besides Go for a newbie
IDE: use whatever make you productive. I personally use vscode. VCS: git, as golang communities use github heavily as base for many libraries. AFAIK Linter: use staticcheck for linting as it looks like mostly used linting tool in go, supported by many also. In Vscode it will be recommended once you install go plugin. Libraries/Framework: actually the standard libraries already included many things you need, decent enough for your day-to-day development cycles(e.g. `net/http`). But here are things for extra: - Struct fields validator: validator - Http server lib: chi router , httprouter , fasthttp (for non standard http implementations, but fast) - Web Framework: echo , gin , fiber , beego , etc - Http client lib: most already covered by stdlib(net/http), so you rarely need extra lib for this, but if you really need some are: resty - CLI: cobra - Config: godotenv , viper - DB Drivers: sqlx , postgre , sqlite , mysql - nosql: redis , mongodb , elasticsearch - ORM: gorm , entgo , sqlc(codegen) - JS Transpiler: gopherjs - GUI: fyne - grpc: grpc - logging: zerolog - test: testify , gomock , dockertest - and many others you can find here
-
A note from our sponsor - InfluxDB
www.influxdata.com | 11 Dec 2023
Stats
spf13/viper is an open source project licensed under MIT License which is an OSI approved license.
The primary programming language of viper is Go.