update... work pending
This commit is contained in:
31
conf/funcs_config.go
Normal file
31
conf/funcs_config.go
Normal file
@@ -0,0 +1,31 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user