Help us shape the future of Go! Take the 2026 Go Developer Survey

envutil

package
v0.0.165 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnvTemplateFileNames = []string{".env.example", ".env.template"}
View Source
var IsAgentuityEnv = isAgentuityEnv
View Source
var LooksLikeSecret = looksLikeSecret

Functions

func AppendToEnvFile

func AppendToEnvFile(envfile string, envs []env.EnvLineComment) ([]env.EnvLineComment, error)

AppendToEnvFile appends envs to the .env file

func DescriptionLookingLikeASecret

func DescriptionLookingLikeASecret(description string) bool

DescriptionLookingLikeASecret checks if a description looks like a secret

func HandleMissingProjectEnvs

func HandleMissingProjectEnvs(ctx context.Context, logger logger.Logger, le []env.EnvLineComment, projectData *project.ProjectData, theproject *project.Project, apiUrl, token string, force bool) *project.ProjectData

HandleMissingProjectEnvs handles missing envs in project

func HandleMissingTemplateEnvs

func HandleMissingTemplateEnvs(logger logger.Logger, dir, envfilename string, le []env.EnvLineComment, templateEnvs map[string][]env.EnvLineComment, force bool) ([]env.EnvLineComment, error)

HandleMissingTemplateEnvs handles missing envs from template files

func LoadOSEnv

func LoadOSEnv() map[string]string

LoadOSEnv loads the OS environment variables

func ProcessEnvFiles

func ProcessEnvFiles(ctx context.Context, logger logger.Logger, dir string, theproject *project.Project, projectData *project.ProjectData, apiUrl, token string, force bool, isLocalDev bool) (*deployer.EnvFile, *project.ProjectData)

ProcessEnvFiles handles .env and template env processing

func PromptForEnv

func PromptForEnv(logger logger.Logger, key string, isSecret bool, localenv map[string]string, osenv map[string]string, defaultValue string, placeholder string) string

func ReadPossibleEnvTemplateFiles

func ReadPossibleEnvTemplateFiles(baseDir string) map[string][]env.EnvLineComment

ReadPossibleEnvTemplateFiles reads .env.example and .env.template files

Types

This section is empty.

Jump to

Keyboard shortcuts

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