package
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: May 21, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func ReadConfig(configPath string, config interface{}) error
type App struct {
Port int32
}
type Config struct {
App App `yaml:"app" validate:"required"`
Logger Logger `yaml:"logger" validate:"required"`
Database Database `yaml:"database" validate:"required"`
}
type Database struct {
File string `yaml:"file"`
}
type Logger struct {
IsDevMode bool `yaml:"isDevMode"`
Level string `yaml:"level"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.