Add configuration management with Viper
- Implement pkg/config package with Viper integration - Support environment variables with DLC_ prefix - Add configurable server host, port, and shutdown timeout - Update server to use configuration values - Add config.example.yaml template file - Update AGENTS.md with configuration documentation - Maintain backward compatibility with default values Configuration options: - DLC_SERVER_HOST (default: 0.0.0.0) - DLC_SERVER_PORT (default: 8080) - DLC_SHUTDOWN_TIMEOUT (default: 30s)
This commit is contained in:
12
go.mod
12
go.mod
@@ -3,9 +3,21 @@ module DanceLessonsCoach
|
||||
go 1.26.1
|
||||
|
||||
require (
|
||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||
github.com/go-chi/chi/v5 v5.2.5 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/rs/zerolog v1.35.0 // indirect
|
||||
github.com/sagikazarmark/locafero v0.11.0 // indirect
|
||||
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
|
||||
github.com/spf13/afero v1.15.0 // indirect
|
||||
github.com/spf13/cast v1.10.0 // indirect
|
||||
github.com/spf13/pflag v1.0.10 // indirect
|
||||
github.com/spf13/viper v1.21.0 // indirect
|
||||
github.com/subosito/gotenv v1.6.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/sys v0.42.0 // indirect
|
||||
golang.org/x/text v0.28.0 // indirect
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user