diff options
| author | Shulhan <ms@kilabit.info> | 2022-05-22 21:29:35 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-05-22 21:51:47 +0700 |
| commit | 0b92dbb8463dee31c005c59f67c2bf754a9eae12 (patch) | |
| tree | a95162fc3aaa88ce772f9b7c8b79747c225a0ba8 /rescached.go | |
| parent | 89494ecacdd03426da17def52e35a1a66c9630eb (diff) | |
| download | rescached-0b92dbb8463dee31c005c59f67c2bf754a9eae12.tar.xz | |
all: export and rename the hostsBlock type to Blockd
In the Environment, we have a field HostsBlocks that reference
an unexported type hostsFile.
In order for any package to be able to use this field, we need to
export this type.
While at it, we rename the type from hostsBlock to Blockd to make it
simple and consistent with name.
Diffstat (limited to 'rescached.go')
| -rw-r--r-- | rescached.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rescached.go b/rescached.go index 694f6b6..f8caf05 100644 --- a/rescached.go +++ b/rescached.go @@ -63,7 +63,7 @@ func (srv *Server) Start() (err error) { logp = "Start" fcaches *os.File - hb *hostsBlock + hb *Blockd hfile *dns.HostsFile zone *dns.Zone answers []*dns.Answer @@ -99,7 +99,7 @@ func (srv *Server) Start() (err error) { return err } - for _, hb = range srv.env.HostsBlocks { + for _, hb = range srv.env.HostBlockd { if !hb.IsEnabled { continue } @@ -114,7 +114,7 @@ func (srv *Server) Start() (err error) { return fmt.Errorf("%s: %w", logp, err) } - srv.env.hostsBlocksFile[hfile.Name] = hfile + srv.env.hostBlockdFile[hfile.Name] = hfile } srv.env.HostsFiles, err = dns.LoadHostsDir(srv.env.pathDirHosts) |
