env
package v1.5.1
Go to latest Published: Dec 7, 2025 License:GPL-3.0
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Imports:16 Opens a new window with list of imports.
Imported by:2 Opens a new window with list of known importers.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Constants
- Variables
- func BlueString(text string) string
- func Clean(props map[string]string, line string) string
- func CleanTableName(tableName string) string
- func CleanWindowsPath(path string) string
- func CyanString(text string) string
- func DarkGrayString(text string) string
- func GetEnvFilePath(dir string) string
- func GetHomeDirConnsMap() (connsMap map[string]map[string]any, err error)
- func GetTempFolder() string
- func GreenString(text string) string
- func HomeBinDir() string
- func InitLogger()
- func IsInteractiveTerminal() bool
- func LogSQL(props map[string]string, query string, args ...any)
- func MagentaString(text string) string
- func Print(text string)
- func Println(text string)
- func RedString(text string) string
- func RemoveAllLocalTempFile(localPath string)
- func RemoveLocalTempFile(localPath string)
- func SetHomeDir(name string) string
- func SetLogger()
- func SetTelVal(key string, value any)
- func UseDuckDbCompute() bool
- func Vars() (vars map[string]string)
- func WriteTempSQL(sql string, filePrefix ...string) (sqlPath string, err error)
- func YellowString(text string) string
- type EnvFile
Constants¶
View Source
const (DdlDefDecLength = 20DdlMinDecLength = 24DdlMaxDecScale = 24DdlMaxDecLength = 38DdlMinDecScale = 6)
Variables¶
View Source
var (HomeDir =os.Getenv("SLING_HOME_DIR")HomeDirEnvFile = ""Env = &EnvFile{}PlausibleURL = ""SentryDsn = ""NoColor =g.In(os.Getenv("SLING_LOGGING"), "NO_COLOR", "JSON")LogSink func(*g.LogLine)TelMap =g.M("begin_time",time.Now().UnixMicro())TelMux =sync.Mutex{}HomeDirs = map[string]string{}NoDebugKey = " /* nD */"Executable = ""IsThreadChild =cast.ToBool(os.Getenv("SLING_THREAD_CHILD"))IsAgentMode =os.Getenv("SLING_AGENT_ID") != "")
Functions¶
funcBlueString¶added inv1.1.8
funcCleanTableName¶added inv1.2.22
funcCleanWindowsPath¶added inv1.2.19
funcCyanString¶added inv1.1.15
funcDarkGrayString¶added inv1.1.15
funcGetEnvFilePath¶added inv1.2.4
funcGetHomeDirConnsMap¶added inv1.2.4
funcGetTempFolder¶added inv1.2.4
func GetTempFolder()string
funcGreenString¶added inv1.1.8
funcHomeBinDir¶added inv1.2.4
func HomeBinDir()string
funcIsInteractiveTerminal¶added inv1.4.10
func IsInteractiveTerminal()bool
IsInteractiveTerminal checks if the current process is running in an interactive terminal
funcMagentaString¶added inv1.2.2
funcRemoveAllLocalTempFile¶added inv1.2.16
func RemoveAllLocalTempFile(localPathstring)
RemoveAllLocalTempFile deletes the local folder
funcRemoveLocalTempFile¶added inv1.2.16
func RemoveLocalTempFile(localPathstring)
RemoveLocalTempFile deletes the local file
funcSetHomeDir¶added inv1.2.4
funcUseDuckDbCompute¶added inv1.4.24
func UseDuckDbCompute()bool
funcWriteTempSQL¶added inv1.2.16
funcYellowString¶added inv1.4.21
Types¶
typeEnvFile¶added inv0.86.56
type EnvFile struct {Connections map[string]map[string]any `json:"connections,omitempty" yaml:"connections,omitempty"`Env map[string]any `json:"env,omitempty" yaml:"env,omitempty"`Variables map[string]any `json:"variables,omitempty" yaml:"variables,omitempty"`// legacyPathstring `json:"-" yaml:"-"`TopCommentstring `json:"-" yaml:"-"`Bodystring `json:"-" yaml:"-"`}funcLoadEnvFile¶added inv0.86.56
funcLoadSlingEnvFile¶added inv0.86.56
func LoadSlingEnvFile() (efEnvFile)
funcLoadSlingEnvFileBody¶added inv1.2.15
func (*EnvFile)WriteEnvFile¶added inv1.2.4
Click to show internal directories.
Click to hide internal directories.