Added server config
This commit is contained in:
parent
7281837015
commit
6d26a5a628
@ -0,0 +1,2 @@
|
|||||||
|
[server]
|
||||||
|
address = "127.0.0.1:8000"
|
@ -11,7 +11,7 @@ var (
|
|||||||
//go:embed config.toml
|
//go:embed config.toml
|
||||||
content []byte
|
content []byte
|
||||||
|
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
// Config is a configuration
|
// Configuration
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Version string
|
Version string
|
||||||
|
*Server `toml:"server"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Server config
|
||||||
|
type Server struct {
|
||||||
|
Address string
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user