feat: initial release v0.3.0

- Support 9 chart types: line, bar, pie, scatter, bubble, donut, mixed, polar, radar
- Multi-format output: ANSI, SVG, PNG, Markdown
- Go + Fiber + gonum/plot
- Docker support
- Morandi color palette
This commit is contained in:
2026-04-16 04:33:02 +08:00
commit ba927c2b2f
21 changed files with 2918 additions and 0 deletions

34
internal/config/config.go Normal file
View File

@@ -0,0 +1,34 @@
package config
import (
"os"
"strconv"
)
type Config struct {
ServerPort string
BaseURL string
}
func Load() *Config {
return &Config{
ServerPort: getEnv("SERVER_PORT", "3100"),
BaseURL: getEnv("BASE_URL", "http://localhost:3100"),
}
}
func getEnv(key, defaultValue string) string {
if value := os.Getenv(key); value != "" {
return value
}
return defaultValue
}
func getEnvAsInt(key string, defaultValue int) int {
if value := os.Getenv(key); value != "" {
if intValue, err := strconv.Atoi(value); err == nil {
return intValue
}
}
return defaultValue
}