attempt at using a config struct instead of the ini library
Added script to convert config-base.json into a go struct, so that access to config values and metadata could be unified and simpler. It probably won't see any actual use though as mapping the ini into it is painful.
This commit is contained in:
@@ -30,6 +30,7 @@ type User struct {
|
||||
}
|
||||
|
||||
type appContext struct {
|
||||
// defaults *Config
|
||||
config *ini.File
|
||||
config_path string
|
||||
configBase_path string
|
||||
@@ -323,7 +324,7 @@ func main() {
|
||||
router.POST("/modifyConfig", ctx.ModifyConfig)
|
||||
ctx.info.Printf("Loading setup @ %s", address)
|
||||
}
|
||||
// router.Run(address)
|
||||
|
||||
srv := &http.Server{
|
||||
Addr: address,
|
||||
Handler: router,
|
||||
|
||||
Reference in New Issue
Block a user