Initial commit: wb-mock skeleton

This commit is contained in:
root
2026-07-23 19:02:03 +03:00
commit 93ebcf4406
9 changed files with 217 additions and 0 deletions

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

@ -0,0 +1,22 @@
package config
import "os"
type Config struct {
Port string
APIKey string
}
func Load() *Config {
return &Config{
Port: getEnv("PORT", "8080"),
APIKey: os.Getenv("WB_API_KEY"),
}
}
func getEnv(key, defaultVal string) string {
if val := os.Getenv(key); val != "" {
return val
}
return defaultVal
}