Versions in this module Expand all Collapse all v0 v0.0.1 Nov 29, 2026 Changes in this version + const BackupSuffix + func Block(m Markers, body string) string + func ClearUserEnv(keys []string) + func EnvBlock(kind string, m Markers, vars []KV) string + func Exists(path string) bool + func GitIgnored(path string) bool + func GitRoot() (string, error) + func IsEnvLine(line, key string) bool + func MaskSecret(s string) string + func PersistUserEnv(vars []KV) error + func Remove(existing string, m Markers) (string, bool) + func RemoveBlockFile(path string, m Markers, dryRun bool) (found bool, err error) + func RemoveEnvValues(existing string, keys []string) (string, bool) + func ShellConfigPath() (path, kind string, err error) + func Upsert(existing, block string, m Markers) string + func UpsertBlockFile(path, block string, m Markers, dryRun bool) (changed bool, err error) + func UpsertEnvValues(existing, body string, keys []string) string + type File struct + Content string + Marker string + Merge func(existing string) (string, error) + Path string + Strip func(path, existing string) (string, bool) + Structured bool + func (f File) Mode() Mode + type KV struct + Key string + Value string + type Markers struct + End string + Start string + type Mode int + const ModeBlock + const ModeMerge + const ModeStructured + type RemoveOutcome struct + Configured bool + Deleted bool + Existed bool + Mode Mode + Restored bool + Stripped bool + func RemoveFile(f File, m Markers, host string, dryRun bool) (RemoveOutcome, error) + type WriteOutcome struct + BackedUp bool + Changed bool + Mode Mode + func UpsertFile(f File, m Markers, dryRun bool) (WriteOutcome, error)