🎙️

Flexible Env in Go V2

Flexible Env in Go V2

lalabuy948/genvutils

Motivation

As you probably saw my founding of two nice libraries that allow you beauty and easy abstraction on dot and just environment variables. You can check it there

After some time I decided to create another open-source library for the world and I merged the functionality of packages which you can find in the article above. I started from scratch and you are more than welcome to have look on it on my GitHub -> github.com/lalabuy948/genvutils

Read more →

Hashicorp Vault as Environment Manager

Hashicorp Vault as Environment Manager

How to use Hashicorp Vault as dot environment manager?

I decided to share this because I was looking for small, simple and easy to use tool where I would store dotenv secrets for my apps. And I found this nice and elegant solution which will allow you to control your application secrets with small bash script. 🙂

Pre Requirements

  • Installed vault
  • Finish setup instructions

You can find nicely described steps here: Getting started

Read more →

Flexible Env in Go

Flexible Env in Go

Forewords

I was doing hobby project, nothing special, server with authentication few endpoints and connection to database. I wrapped this project in docker to distribute project to another developer, he wanted to help with fronted but not that fluent at the backend part. Then I realized that my friend does not want to struggle with database setup and so on. So, solution was straight forward - docker-compose.

Problem

I prefer using .env instead of typing stuff to cli. I found out really elegant solution. You can still use .env and parse it easily with github.com/caarlos0/env/v6, specify default values or even load file (certificates etc). But in docker-compose you need to specify same ports for database for example. Here comes github.com/joho/godotenv, if you provide environment variables via dockerfile or docker-compose it will override constants in your .env.

Read more →