dot

package
v0.0.0-...-b294791 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package dot implements a wrapper around John Barton's package for loading dot files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(prefix string, show, verbose bool) error

Load tries to emulate the priority list from the dotenv page at https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use Pri Filename______________ Env__ .gitignore? 1st .env.development.local dev yes 1st .env.test.local test yes 1st .env.production.local prod yes 2nd .env.local all yes 3rd .env.development dev no, but be wary of secrets 3rd .env.test test no, but be wary of secrets 3rd .env.production prod no, but be wary of secrets 4th .env all no, but be wary of secrets

Notes:

  • The .env.*.local files are for local overrides of environment-specific settings. We assume that they're created by the deployment process. They can contain sensitive information like credentials or tokens. They are loaded first, so they will override settings in the shared files. They should never be checked into the repository.
  • The .env.local file is loaded in development and production; never in test. It should never be checked into the repository.
  • The .env.* files are shared environment-specific settings. They should not contain sensitive information like credentials or tokens. They should always be checked into the repository.
  • The .env file is loaded in all environments. It should not contain sensitive information like credentials or tokens. It is loaded last, so all other files will override any settings. It should always be checked into the repository.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL