GoBroke/conf/funcs_config.go
2025-02-04 12:14:08 -05:00

32 lines
559 B
Go

package conf
// Checksum returns the current configuration's checksum.
func (c *Config) Checksum() (cksum []byte) {
cksum = make([]byte, len(c.cksum))
copy(cksum, c.cksum)
return
}
// IsDebug returns whether debug is enabled or not.
func (c *Config) IsDebug() (isDebug bool) {
isDebug = c.debug
return
}
/*
Path returns the config file this configuration was loaded from.
It'll be an empty string if it was loaded in directly from raw bytes.
*/
func (c *Config) Path() (path string) {
if c.confPath != nil {
path = *c.confPath
}
return
}