INNER CODE UNIT · Go
IsEmbeddedConfig
casosorg/casos · conf/build_embed.go:26
func IsEmbeddedConfig() bool {
return embeddedConfigLoaded
}
// loadEmbeddedConfig points beego at the compiled-in conf/app.conf when no copy
// exists in the working directory or next to the executable. An on-disk file
// always wins, so dropping a conf/app.conf beside the binary remains the way to
// configure a standalone installation.
//
// Replacing beego's config wholesale, rather than answering individual keys,
// keeps a single configuration source at runtime: every reader — including the
// ones that go straight to beego.AppConfig — sees the same values, and no
// lookup can silently take precedence over a default declared in Go.
//
// beego only loads a config from a path, so the embedded bytes take a detour
// through a temporary file. beego parses it eagerly, which is why the file is
// removed again as soon as it has been read.
func loadEmbeddedConfig() {