Discover Packages
github.com/gomicro/align
config
package
Version:
v0.0.6
Opens a new window with list of versions in this module.
Published: Nov 27, 2026
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: ? 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 handles reading and writing the align configuration at ~/.align/config.
CreateDir creates the ~/.align config directory, including any missing parents.
DirExists reports whether the ~/.align config directory exists.
FileExists reports whether the ~/.align/config file exists.
FilePath returns the default configuration file path.
type Config struct {
Github *GithubHost `yaml:"github.com"`
}
Config holds the top-level align configuration read from ~/.align/config.
New returns a Config with the given GitHub token and default rate limits.
ParseFromFile reads ~/.align/config, creating the config directory if absent.
ReadFile reads a config file, creating its parent directory if absent.
WithDefaults returns an independent copy with missing GitHub settings initialized.
WriteFile marshals and writes the config to ~/.align/config.
WriteFileAt marshals and writes the config at path.
type GithubHost struct {
Token string `yaml:"token"`
Username string `yaml:"username"`
PrivateKey string `yaml:"private_key"`
PrivateKeyFile string `yaml:"private_key_file"`
Limits *Limits `yaml:"limits"`
}
GithubHost holds authentication and rate-limit settings for a GitHub host.
type Limits struct {
RequestsPerSecond int `yaml:"request_per_second"`
Burst int `yaml:"burst"`
}
Limits configures GitHub API client request rates.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.