feat: add go backend skeleton

This commit is contained in:
Yoilun
2026-05-25 16:04:26 +08:00
parent de20fda424
commit be466ae5fc
8 changed files with 156 additions and 2 deletions

22
internal/app/config.go Normal file
View File

@@ -0,0 +1,22 @@
package app
import (
"os"
"path/filepath"
)
type Config struct {
CodexHome string
HTTPAddr string
}
func DefaultConfig() Config {
home, err := os.UserHomeDir()
if err != nil {
home = "."
}
return Config{
CodexHome: filepath.Join(home, ".codex"),
HTTPAddr: "127.0.0.1:18083",
}
}