feat: add foreground mode, pause/resume commands, API docs

This commit is contained in:
2026-03-25 00:12:14 +08:00
parent b00f95b7fb
commit 8ce1e6531a
8 changed files with 502 additions and 76 deletions

View File

@@ -43,7 +43,14 @@ func GetLogDir() string {
func LoadConfig() (*Config, error) {
configDir := GetConfigDir()
configPath := filepath.Join(configDir, "config.json")
return loadConfigFile(configPath)
}
func LoadConfigFrom(path string) (*Config, error) {
return loadConfigFile(path)
}
func loadConfigFile(configPath string) (*Config, error) {
data, err := os.ReadFile(configPath)
if err != nil {
if os.IsNotExist(err) {