Configure Go applications from the environment

envconf

Configure your Go application from the environment.

Supports most basic Go types and works nicely with the built in flag package.

package main

import(
  "flag"
  "fmt"
  . "github.com/ian-kent/envconf"
)

func main() {
  count := flag.Int("count", FromEnvP("COUNT", 15).(int), "Count target")
  flag.Parse()
  for i := 1; i <= *count; i++ {
    fmt.Printf("%d\n", i)
  }
}

Licence

Copyright Β©β€Ž 2014, Ian Kent (http://iankent.uk).

Released under MIT license, see LICENSE for details.

Owner
Ian Kent
Love code... mostly Go, now a bit of Elm. Created @mailhog and @websysd
Ian Kent
Similar Resources

Declaratively configure your Hydra server with Terraform.

terraform-provider-hydra The Terraform Hydra provider is a plugin for Terraform that allows for declarative management of a Hydra instance. You can fi

Nov 9, 2022

A go library for easy configure and run command chains. Such like pipelining in unix shells.

go-command-chain A go library for easy configure and run command chains. Such like pipelining in unix shells. Example cat log_file.txt | grep error |

Dec 27, 2022

Jenkins is a wonderful system for managing builds, and people love using its UI to configure jobs

Jenkins is a wonderful system for managing builds, and people love using its UI to configure jobs

Jenkins Job DSL Plugin Introduction Jenkins is a wonderful system for managing builds, and people love using its UI to configure jobs. Unfortunately,

Dec 20, 2022

go HTTP client that makes it plain simple to configure TLS, basic auth, retries on specific errors, keep-alive connections, logging, timeouts etc.

goat Goat, is an HTTP client built on top of a standard Go http package, that is extremely easy to configure; no googling required. The idea is simila

Jun 25, 2022

Golang tool to configure the Barco CX-20 station in one click. T

Golang tool to configure the Barco CX-20 station in one click. T

Golang tool to configure the Barco CX-20 station in one click. The CX-20 connect wireless to existing huddle room camera, speakerphones and audio peripherals, saving time and maximizing efficiency.

Aug 29, 2022

Configure instead of coding gin server!

tao-gin _______ _____ _ |__ __| / ____(_) | | __ _ ___ | | __ _ _ __ | |/ _` |/ _ \ | | |_ | |

Jan 10, 2022

Wg-configurator - This project makes it easier to configure a fleet of servers interconnected via the WireGuard point-to-point virtual private network.

WireGuard Configurator This project makes it easier to configure a fleet of servers interconnected via the WireGuard point-to-point virtual private ne

Mar 29, 2022

UltiTuner: a small helper tool to configure functions for Ultimaker S-Line printers

UltiTuner UltiTuner is a small helper tool to configure functions for Ultimaker

Apr 25, 2022

ezd is an easy to configure docker-based task runner system

ezd - eZ Docker Task Runner ezd is an easy to configure docker-based task runner system. Getting started Create an ezd.yml file in your project root:

Feb 11, 2022

Ale is a Lisp Environment for Go applications

Ale is a Lisp Environment Ale is a Lisp Environment for Go applications How To Install Make sure your GOPATH is set, then run go get to retrieve the p

Dec 1, 2022

SigNoz helps developer monitor applications and troubleshoot problems in their deployed applications

SigNoz helps developer monitor applications and troubleshoot problems in their deployed applications

SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. πŸ”₯ πŸ–₯

Dec 27, 2022

Tag-based environment configuration for structs

env Tag-based environment configuration for structs. Installation $ go get -u github.com/codingconcepts/env Usage package main import ( "fmt" "log"

Dec 23, 2022

✨Clean and minimalistic environment configuration reader for Golang

Clean Env Minimalistic configuration reader Overview This is a simple configuration reading tool. It just does the following: reads and parses configu

Jan 8, 2023

Simple lib to parse environment variables to structs

env Simple lib to parse envs to structs in Go. Example A very basic example: package main import ( "fmt" "time" // if using go modules "github.c

Jan 9, 2023

Un-marshaling environment variables to Go structs

envcfg Un-marshaling environment variables to Go structs Getting Started Let's set a bunch of environment variables and then run your go app #!/usr/bi

Sep 26, 2022

Small library to read your configuration from environment variables

envconfig envconfig is a library which allows you to parse your configuration from environment variables and fill an arbitrary struct. See the example

Nov 3, 2022

Go helpers to manage environment variables

Envh This library is made up of two parts : Env object : it wraps your environments variables in an object and provides convenient helpers. Env tree o

Sep 26, 2022

goconfig uses a struct as input and populates the fields of this struct with parameters from command line, environment variables and configuration file.

goconfig goconfig uses a struct as input and populates the fields of this struct with parameters from command line, environment variables and configur

Dec 15, 2022

A Go port of Ruby's dotenv library (Loads environment variables from `.env`.)

GoDotEnv A Go (golang) port of the Ruby dotenv project (which loads env vars from a .env file) From the original Library: Storing configuration in the

Jan 5, 2023
xlog is a logger for net/context aware HTTP applications
xlog is a logger for net/context aware HTTP applications

⚠️ Check zerolog, the successor of xlog. HTTP Handler Logger xlog is a logger for net/context aware HTTP applications. Unlike most loggers, xlog will

Sep 26, 2022
Sep 24, 2021
A minimal configuration manager for Go applications.

Confetti A simple config manager for Go applications. Install Use the following: go get -u github.com/shivanshkc/confetti/v2 When to use Confetti Con

Dec 7, 2021
BTFS - The First Scalable Decentralized Storage System - A Foundational Platform for Decentralized Applications

go-btfs What is BTFS? BitTorrent File System (BTFS) is a protocol forked from IPFS that utilizes the TRON network and the BitTorrent Ecosystem for int

Jan 1, 2023
Example of trace instrumentation in Golang applications :bar_chart:
Example of trace instrumentation in Golang applications :bar_chart:

go-opentelemetry-example Example of trace instrumentation in Golang applications using the opentelemetry. Requirements/dependencies Docker Docker-comp

Jun 4, 2022
Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.

Consul Website: https://www.consul.io Tutorials: HashiCorp Learn Forum: Discuss Consul is a distributed, highly available, and data center aware solut

Jan 2, 2023
Genv is a library for Go (golang) that makes it easy to read and use environment variables in your projects. It also allows environment variables to be loaded from the .env file.

genv Genv is a library for Go (golang) that makes it easy to read and use environment variables in your projects. It also allows environment variables

Dec 21, 2022
Forklift: an API application developed with go that enables virtual server migration from vcenter virtualization environment to openstack environment
Forklift: an API application developed with go that enables virtual server migration from vcenter virtualization environment to openstack environment

What is the Forklift? Forklift is an API application developed with go that enables virtual server migration from vcenter virtualization environment t

Jan 14, 2022
Configure is a Go package that gives you easy configuration of your project through redundancy

Configure Configure is a Go package that gives you easy configuration of your project through redundancy. It has an API inspired by negroni and the fl

Sep 26, 2022
Nipo is a powerful, fast, multi-thread, clustered and in-memory key-value database, with ability to configure token and acl on commands and key-regexes written by GO

Welcome to NIPO Nipo is a powerful, fast, multi-thread, clustered and in-memory key-value database, with ability to configure token and acl on command

Dec 28, 2022