aboutsummaryrefslogtreecommitdiff
path: root/environment.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-06-12 14:29:31 +0700
committerShulhan <ms@kilabit.info>2022-06-12 14:29:31 +0700
commit95622f8904b8448f97e46a55b2da2273f511a8b8 (patch)
tree9066702f2db3b2a88996d70815c5d69cd87fa059 /environment.go
parent85418757eb06caa3ef30205249397cfb50e95f0f (diff)
downloadrescached-95622f8904b8448f97e46a55b2da2273f511a8b8.tar.xz
all: un-export HostsFiles and Zones fields on Environment
Previously those fields exported because web client need it to initialize the content for /hosts.d and /zone.d pages. Since we now have HTTP API for that, web client can call get request to the respective API without depends on the environment.
Diffstat (limited to 'environment.go')
-rw-r--r--environment.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/environment.go b/environment.go
index 7206aed..1068ea9 100644
--- a/environment.go
+++ b/environment.go
@@ -75,8 +75,8 @@ type Environment struct {
HostBlockd map[string]*Blockd `ini:"block.d"`
hostBlockdFile map[string]*dns.HostsFile
- HostsFiles map[string]*dns.HostsFile
- Zones map[string]*dns.Zone
+ hostsd map[string]*dns.HostsFile
+ zoned map[string]*dns.Zone
// The options for WUI HTTP server.
HttpdOptions *libhttp.ServerOptions `json:"-"`
@@ -115,8 +115,8 @@ func LoadEnvironment(dirBase, fileConfig string) (env *Environment, err error) {
// newEnvironment create and initialize options with default values.
func newEnvironment(dirBase, fileConfig string) *Environment {
return &Environment{
- HostsFiles: make(map[string]*dns.HostsFile),
- Zones: make(map[string]*dns.Zone),
+ hostsd: make(map[string]*dns.HostsFile),
+ zoned: make(map[string]*dns.Zone),
dirBase: dirBase,
pathDirBlock: filepath.Join(dirBase, dirBlock),