Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 973 Bytes

README.md

File metadata and controls

44 lines (28 loc) · 973 Bytes

Files2Env

Table of Contents

About

Golang module, that imports all files in a folder, and assigns the names and value, as env variables.

Usecase is Kubernetes Service Bindings, where the secrets, are attached to the container, as files.

This allows you to easy extract the secrets, and map them as env variables, to be used in your code.

Installing

Run the following to install the package

go get github.com/rhjensen79/[email protected]

Usage

The following example, shows how to import secrets, from a ./secrets folder

package main

import (
 "github.com/rhjensen79/files2env"
)

func main() {
 files2env.Import("./secrets")
}

Collaboration

If you find issues, then feel free to create and issue, or help with making the code better.