The highest tagged major version is
v3 .
Discover Packages
github.com/0xSMW/mail.app-cli/v2
internal
config
package
Version:
v2.4.0
Opens a new window with list of versions in this module.
Published: Oct 14, 2026
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package config reads and writes the user configuration file and resolves
each setting from flag, environment, file, or default in that order.
View Source
const (
KeyAccount = "account"
KeyMailbox = "mailbox"
KeyOutput = "output"
EnvConfigPath = "MAIL_APP_CLI_CONFIG"
EnvAccount = "MAIL_APP_CLI_ACCOUNT"
EnvMailbox = "MAIL_APP_CLI_MAILBOX"
EnvOutput = "MAIL_APP_CLI_OUTPUT"
SourceFlag = "flag"
SourceEnv = "env"
SourceConfig = "config"
SourceDefault = "default"
)
Keys lists the settable keys in display order.
Path returns the config file location: $MAIL_APP_CLI_CONFIG, else
$XDG_CONFIG_HOME/mail-app-cli/config.json, else ~/.config/mail-app-cli/config.json.
Save writes the config file, creating its directory.
type Config struct {
Account string `json:"account,omitempty"`
Mailbox string `json:"mailbox,omitempty"`
Output string `json:"output,omitempty"`
}
Config is the on-disk shape. Empty values are omitted so the file only
records what the user set.
Load reads the config file. A missing file is an empty config, not an error.
Get returns the value stored for key.
Set validates and stores a value. An empty value clears the key.
type Resolved struct {
Account Value `json:"account"`
Mailbox Value `json:"mailbox"`
Output Value `json:"output"`
Path string `json:"path"`
}
Resolved holds every setting after precedence is applied.
Resolve applies flag > env > config > default for each key. flags holds
only the flags the user explicitly set.
Rows renders the resolved settings as key, value, source triples in key order.
type Value struct {
Value string `json:"value"`
Source string `json:"source"`
}
Value is a resolved setting with where it came from.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.