mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:44:35 +03:00
move config-changing code from package mox-/ to admin/
needed for upcoming changes, where (now) package admin needs to import package store. before, because package store imports mox- (for accessing the active config), that would lead to a cyclic import. package mox- keeps its active config, package admin has the higher-level config-changing functions.
This commit is contained in:
@ -5,11 +5,18 @@ import (
|
||||
)
|
||||
|
||||
// ConfigDirPath returns the path to "f". Either f itself when absolute, or
|
||||
// interpreted relative to the directory of the current config file.
|
||||
// interpreted relative to the directory of the static configuration file
|
||||
// (mox.conf).
|
||||
func ConfigDirPath(f string) string {
|
||||
return configDirPath(ConfigStaticPath, f)
|
||||
}
|
||||
|
||||
// Like ConfigDirPath, but relative paths are interpreted relative to the directory
|
||||
// of the dynamic configuration file (domains.conf).
|
||||
func ConfigDynamicDirPath(f string) string {
|
||||
return configDirPath(ConfigDynamicPath, f)
|
||||
}
|
||||
|
||||
// DataDirPath returns to the path to "f". Either f itself when absolute, or
|
||||
// interpreted relative to the data directory from the currently active
|
||||
// configuration.
|
||||
|
Reference in New Issue
Block a user