+3
-4
src/main.go
+3
-4
src/main.go
···
339
// The backend is not recreated (this is intentional as it allows preserving the cache).
340
OnReload(func() {
341
if newConfig, err := Configure(*configTomlPath); err != nil {
342
-
log.Println("config:", err)
343
-
log.Println("config: reload error")
344
} else {
345
// From https://go.dev/ref/mem:
346
// > A read r of a memory location x holding a value that is not larger than
···
356
); err != nil {
357
// At this point the configuration is in an in-between, corrupted state, so
358
// the only reasonable choice is to crash.
359
-
log.Fatalln("config: reload failure:", err)
360
} else {
361
-
log.Println("config: reloaded")
362
}
363
}
364
})
···
339
// The backend is not recreated (this is intentional as it allows preserving the cache).
340
OnReload(func() {
341
if newConfig, err := Configure(*configTomlPath); err != nil {
342
+
log.Println("config: reload err:", err)
343
} else {
344
// From https://go.dev/ref/mem:
345
// > A read r of a memory location x holding a value that is not larger than
···
355
); err != nil {
356
// At this point the configuration is in an in-between, corrupted state, so
357
// the only reasonable choice is to crash.
358
+
log.Fatalln("config: reload fail:", err)
359
} else {
360
+
log.Println("config: reload ok")
361
}
362
}
363
})