Added server config

This commit is contained in:
perp 2024-10-09 13:18:31 +01:00
parent 7281837015
commit 6d26a5a628
3 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,2 @@
[server]
address = "127.0.0.1:8000"

View File

@ -11,7 +11,7 @@ var (
//go:embed config.toml
content []byte
version = "0.1.0"
version = "0.1.1"
)
func main() {

View File

@ -1,6 +1,12 @@
package config
// Config is a configuration
// Configuration
type Config struct {
Version string
*Server `toml:"server"`
}
// Server config
type Server struct {
Address string
}