dotenvgenerator

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

README

Dotenv Generator

This helper will recreate .env file by prompting question in terminal

Tags
Tag Description
envconfig Create .env key field
prompt Prompt question on terminal and save answer as value
default Use this value if prompt not answered
secret If true, the input will not be displayed on the terminal
comment Add comment before this field
Example

Open example folder and run:

go run example.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDotEnv

func GenerateDotEnv(cfg interface{}, build, cancelBuildInError bool, p Prompter) (rows []string, err error)

generate .env file from struct envconfig tags

Types

type Prompter added in v1.0.2

type Prompter interface {
	PromptString(prompt string) string
	PromptPassword(prompt string) string
}

Directories

Path Synopsis
example
Package mock_dotenvgenerator is a generated GoMock package.
Package mock_dotenvgenerator is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳