Refactor config package

This commit is contained in:
2021-10-25 18:28:36 +02:00
parent 0ce211b46d
commit 0bdbff89ac
3 changed files with 144 additions and 82 deletions

View File

@ -18,11 +18,11 @@ import (
type afterLockConfig struct {
INITIAL_DELAY int
LOOP_DELAY int
LOCK_PATH string
INITIAL_DELAY int `optional`
LOOP_DELAY int `optional`
LOCK_PATH string `optional`
LOG_PATH string
PRINT_STACKTRACES bool
PRINT_STACKTRACES bool `optional`
}
var configuration = afterLockConfig{
@ -46,7 +46,7 @@ func init() {
func main() {
defer handleErrors()
err := config.Build("AFL", &configuration)
err := config.NewBuilder().Build("AFL_", &configuration)
if err != nil {
panic(err)
}