env

package
v0.0.0-...-e64b6cb Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DOT_ENV = ".env"

Variables

View Source
var InitialUserPasswordFile = osenv.Get("LOGIN_INITIAL_USER_PASSWORD_FILE", "Initial user password file", filepath.Join(PKG_DIR, ".initial_user_password"))
View Source
var PKG_DIR = func() string {
	workDir := "."
	for _, arg := range os.Args {
		if strings.HasPrefix(arg, "-test.") {
			var (
				cmd = exec.Command("go", "env", "GOMOD")
				out bytes.Buffer
			)
			cmd.Stdout = &out
			if err := cmd.Run(); err != nil {
				panic(err)
			}

			gomod := strings.TrimSpace(out.String())
			if gomod == "" {
				panic("GOMOD is empty")
			}
			return filepath.Dir(gomod)
		}
	}
	return workDir
}()

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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