Documentation
¶
Overview ¶
Package env implements multi-environment management for nSelf projects. Each environment (dev, staging, prod) has its own .env file, Docker project name, network, and volume namespace to enable side-by-side operation.
Index ¶
Constants ¶
View Source
const DefaultEnv = "dev"
DefaultEnv is the environment used when none is explicitly set.
Variables ¶
This section is empty.
Functions ¶
func ActiveEnv ¶
ActiveEnv reads the currently active environment from .nself/active_env. Returns DefaultEnv if the file does not exist.
func DockerProjectName ¶
DockerProjectName returns the Docker Compose project name for a given project and environment: nself-{project}-{env}.
func SetActiveEnv ¶
SetActiveEnv writes the active environment to .nself/active_env.
Types ¶
type DiffEntry ¶
type DiffEntry struct {
Key string
ValueA string // value in env A (empty = not present)
ValueB string // value in env B (empty = not present)
}
DiffEntry describes a difference between two environments.
Click to show internal directories.
Click to hide internal directories.