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

env

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Env      = &EnvFile{}
	HomeDirs = map[string]string{}
)
View Source
var EnvFolder embed.FS

Functions

func GetEnvFilePath

func GetEnvFilePath(dir string) string

func GetHomeDirConnsMap

func GetHomeDirConnsMap() (connsMap map[string]map[string]any, err error)

func SetHomeDir

func SetHomeDir(name string) string

func Vars

func Vars() (vars map[string]string)

Vars are the variables we are using

Types

type EnvFile

type EnvFile struct {
	Connections map[string]map[string]interface{} `json:"connections,omitempty" yaml:"connections,omitempty"`
	Variables   map[string]interface{}            `json:"variables,omitempty" yaml:"variables,omitempty"`

	Path       string `json:"-" yaml:"-"`
	TopComment string `json:"-" yaml:"-"`
}

func LoadEnvFile

func LoadEnvFile(path string) (ef EnvFile)

func (*EnvFile) WriteEnvFile

func (ef *EnvFile) WriteEnvFile() (err error)

Jump to

Keyboard shortcuts

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