Per CODE_STYLEGUIDE rule: "Almost all services/servers should accept their configuration via environment variables. Only go full config file if absolutely necessary."
The current internal/config/config.go uses a custom pkg/config package that wraps Viper with a YAML-based multi-environment config file format (with configDefaults, environments.dev.config, environments.prod.config sections, and value resolution via $ENV:, $GSM:, $ASM:, $FILE: prefixes). This is significantly more complex than the standard Viper + AutomaticEnv() pattern from GO_HTTP_SERVER_CONVENTIONS §8.
Additionally, the example config file (configs/config.yaml.example) references PostgreSQL (dburl: postgres://...) but the application uses SQLite.
Recommendation: Simplify to use Viper directly with AutomaticEnv() as the primary configuration method, with optional config file fallback. Environment variable names should be WEBHOOKER_PORT, WEBHOOKER_DBURL, etc. The pkg/config package could remain as a library but the internal config should follow the standard pattern.
Per CODE_STYLEGUIDE rule: "Almost all services/servers should accept their configuration via environment variables. Only go full config file if absolutely necessary."
The current `internal/config/config.go` uses a custom `pkg/config` package that wraps Viper with a YAML-based multi-environment config file format (with `configDefaults`, `environments.dev.config`, `environments.prod.config` sections, and value resolution via `$ENV:`, `$GSM:`, `$ASM:`, `$FILE:` prefixes). This is significantly more complex than the standard Viper + `AutomaticEnv()` pattern from GO_HTTP_SERVER_CONVENTIONS §8.
Additionally, the example config file (`configs/config.yaml.example`) references PostgreSQL (`dburl: postgres://...`) but the application uses SQLite.
Recommendation: Simplify to use Viper directly with `AutomaticEnv()` as the primary configuration method, with optional config file fallback. Environment variable names should be `WEBHOOKER_PORT`, `WEBHOOKER_DBURL`, etc. The `pkg/config` package could remain as a library but the internal config should follow the standard pattern.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Per CODE_STYLEGUIDE rule: "Almost all services/servers should accept their configuration via environment variables. Only go full config file if absolutely necessary."
The current
internal/config/config.gouses a custompkg/configpackage that wraps Viper with a YAML-based multi-environment config file format (withconfigDefaults,environments.dev.config,environments.prod.configsections, and value resolution via$ENV:,$GSM:,$ASM:,$FILE:prefixes). This is significantly more complex than the standard Viper +AutomaticEnv()pattern from GO_HTTP_SERVER_CONVENTIONS §8.Additionally, the example config file (
configs/config.yaml.example) references PostgreSQL (dburl: postgres://...) but the application uses SQLite.Recommendation: Simplify to use Viper directly with
AutomaticEnv()as the primary configuration method, with optional config file fallback. Environment variable names should beWEBHOOKER_PORT,WEBHOOKER_DBURL, etc. Thepkg/configpackage could remain as a library but the internal config should follow the standard pattern.clawbot referenced this issue2026-03-02 00:56:20 +01:00