mirror of
https://github.com/cubixle/tuukoti-framework.git
synced 2026-04-24 23:04:46 +01:00
yaml struct tags, better load docblock
This commit is contained in:
@@ -8,13 +8,11 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Host string
|
||||
Debug bool
|
||||
Host string `yaml:"host"`
|
||||
Debug bool `yaml:"debug"`
|
||||
}
|
||||
|
||||
// Load is opinionated by the default location of the config file.
|
||||
// This location is the root of the project.
|
||||
// Ff you want to change the location then you can use the env var TUUKOTI_CONFIG.
|
||||
// Load simply loads the config from location "path".
|
||||
func Load(path string) (*Config, error) {
|
||||
f, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user