nasermirzaei89/env alternatives and similar packages
Based on the "Configuration" category.
Alternatively, view nasermirzaei89/env alternatives based on common mentions on social networks and blogs.
-
kelseyhightower/envconfig
Go library for managing configuration data from environment variables. -
konfig
Composable, observable and performant config handling for Go for the distributed processing era. -
koanf
Light weight, extensible library for reading config in Go applications. Built in support for JSON, TOML, YAML, env, command line. -
gookit/config
application config manage(load,get,set). support JSON, YAML, TOML, INI, HCL. multi file load, data override merge. -
hjson
Human JSON, a configuration file format for humans. Relaxed syntax, fewer mistakes, more comments. -
gcfg
read INI-style configuration files into Go structs; supports user-defined types and subsections -
joshbetz/config
A small configuration library for Go that parses environment variables, JSON files, and reloads automatically on SIGHUP. -
goConfig
Parse a struct as input and populates the fields of this struct with parameters fom command line, environment variables and configuration file. -
harvester
Harvester, a easy to use static and dynamic configuration package supportig seeding, env vars and Consul integration. -
onion
Layer based configuration for Go, Supports JSON, TOML, YAML, properties, etcd, env, and encryption using PGP. -
configuro
opinionated configuration loading & validation framework from ENV and Files focused towards 12-Factor compliant applications. -
configure
Provides configuration through multiple sources, including JSON, flags and environment variables. -
configuration
Library for initializing configuration structs from env variables, files, flags and 'default' tag. -
hocon
Configuration library for working with the HOCON(a human-friendly JSON superset) format, supports features like environment variables, referencing other values, comments and multiple files. -
go-ssm-config
Go utility for loading configuration parameters from AWS SSM (Parameter Store). -
sprbox
Build-environment aware toolbox factory and agnostic config parser (YAML, TOML, JSON and Environment vars). -
swap
Instantiate/configure structs recursively, based on build environment. (YAML, TOML, JSON and env). -
gonfig
Tag-based configuration parser which loads values from different providers into typesafe struct. -
gone/jconf
Modular JSON configuration. Keep you config structs along the code they configure and delegate parsing to submodules without sacrificing full config serialization. -
txgruppi-config
Quick and easy way to load config files based on a simple set of rules.
Get performance insights in less than 4 minutes
Do you think we are missing an alternative of nasermirzaei89/env or a related project?
Popular Comparisons
README
Env
Golang Get Environment Variables Package
Install
go get github.com/nasermirzaei89/env
Sample Usage
With default value
package main
import (
"fmt"
"github.com/nasermirzaei89/env"
)
func main() {
var b = env.GetBool("A", true)
fmt.Println(b) // true (default)
var f = env.GetFloat("B", 14.5)
fmt.Println(f) // 14.5 (default)
var i = env.GetInt("C", 12)
fmt.Println(i) // 12 (default)
var s = env.GetString("B", "hi")
fmt.Println(s) // hi (default)
}
Force setting environment
package main
import (
"fmt"
"github.com/nasermirzaei89/env"
)
func main() {
var s = env.MustGetString("HOME")
fmt.Println(s) // /Users/nasermirzaei89
s = env.MustGetString("NEW") // panics
}
Contributing
You can submit a new issue in github issues. Or you can create a fork, hack on your fork and when you're done create a pull request, so that the code contribution can get merged into the main package.
*Note that all licence references and agreements mentioned in the nasermirzaei89/env README section above
are relevant to that project's source code only.