Initial scaffold and technical specification
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package config
|
||||
|
||||
import "os"
|
||||
|
||||
type Config struct {
|
||||
HTTPAddr string
|
||||
}
|
||||
|
||||
func FromEnv() Config {
|
||||
addr := os.Getenv("HTTP_ADDR")
|
||||
if addr == "" {
|
||||
addr = ":8080"
|
||||
}
|
||||
|
||||
return Config{
|
||||
HTTPAddr: addr,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user