Documentation
¶
Overview ¶
Package env provides utilities for parsing and manipulating .env files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountLines ¶
CountLines counts non-empty, non-comment lines in env content.
func DeriveEnvFromFile ¶
DeriveEnvFromFile derives the environment name from a filename. Examples:
- ".env" -> "development"
- ".env.production" -> "production"
- ".env.staging" -> "staging"
Types ¶
type PullDiff ¶
type PullDiff struct {
Added []string // in vault, not in local
Changed []string // in both, different values
LocalOnly []string // in local, not in vault
Unchanged []string // in both, same values
}
PullDiff represents the difference between local and vault secrets for a pull operation.
func CalculatePullDiff ¶
CalculatePullDiff calculates the differences between local and vault secrets for pulling.
func (*PullDiff) HasChanges ¶
HasChanges returns true if there are any differences.
type PushDiff ¶
type PushDiff struct {
Added []string // in local, not in vault (will be created)
Changed []string // in both, different values (will be updated)
Removed []string // in vault, not in local (will be deleted)
}
PushDiff represents the difference between local and vault secrets for a push operation.
func CalculatePushDiff ¶
CalculatePushDiff calculates the differences between local and vault secrets for pushing.
func (*PushDiff) HasChanges ¶
HasChanges returns true if there are any differences.