diff options
| author | Shulhan <m.shulhan@gmail.com> | 2020-08-25 22:45:56 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2020-08-25 22:46:25 +0700 |
| commit | 0e957523760faf1aa44b7128a30ccd4cf6c6bc17 (patch) | |
| tree | 9cd332111eccd227752cbd1da22846aa90e92be5 | |
| parent | 02eb7ad85df4e9d390e9ce13a62237f9934f762f (diff) | |
| download | rescached-0e957523760faf1aa44b7128a30ccd4cf6c6bc17.tar.xz | |
go.mod: update with latest share package
Add second parameter to method PopulateCachesByXxx for clearity.
| -rw-r--r-- | go.mod | 2 | ||||
| -rw-r--r-- | go.sum | 4 | ||||
| -rw-r--r-- | httpd.go | 6 | ||||
| -rw-r--r-- | rescached.go | 7 |
4 files changed, 10 insertions, 9 deletions
@@ -2,6 +2,6 @@ module github.com/shuLhan/rescached-go/v3 go 1.13 -require github.com/shuLhan/share v0.18.1-0.20200823145520-86dabdd111c2 +require github.com/shuLhan/share v0.18.1-0.20200825154056-1a09e8f2cc9b //replace github.com/shuLhan/share => ../share @@ -1,5 +1,5 @@ -github.com/shuLhan/share v0.18.1-0.20200823145520-86dabdd111c2 h1:BpSOHfEdE1ls/xmJnEgBkCaF88WEFIb+XpXoDE8Fzxw= -github.com/shuLhan/share v0.18.1-0.20200823145520-86dabdd111c2/go.mod h1:FqPloTQlDTAmMXxaWft/V5tPmxEHBJeyJMAzVm4/1og= +github.com/shuLhan/share v0.18.1-0.20200825154056-1a09e8f2cc9b h1:NbtPFRMtTipaWmmudc0hSTb83Hbt1JUbII5wpZMya3M= +github.com/shuLhan/share v0.18.1-0.20200825154056-1a09e8f2cc9b/go.mod h1:FqPloTQlDTAmMXxaWft/V5tPmxEHBJeyJMAzVm4/1og= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -340,7 +340,7 @@ func (srv *Server) hostsBlockEnable(hb *hostsBlock) (err error) { return err } - err = srv.dns.PopulateCachesByRR(hfile.Records) + err = srv.dns.PopulateCachesByRR(hfile.Records, hfile.Path) if err != nil { return err } @@ -463,7 +463,7 @@ func (srv *Server) apiHostsFileUpdate( } // Populate new hosts to cache. - err = srv.dns.PopulateCachesByRR(hfile.Records) + err = srv.dns.PopulateCachesByRR(hfile.Records, hfile.Path) if err != nil { res.Message = err.Error() return nil, res @@ -652,7 +652,7 @@ func (srv *Server) apiMasterFileCreateRR( } listRR := []*dns.ResourceRecord{&rr} - err = srv.dns.PopulateCachesByRR(listRR) + err = srv.dns.PopulateCachesByRR(listRR, mf.Path) if err != nil { res.Message = "UpsertCacheByRR: " + err.Error() return nil, res diff --git a/rescached.go b/rescached.go index 22334f4..710f3e1 100644 --- a/rescached.go +++ b/rescached.go @@ -64,7 +64,8 @@ func (srv *Server) Start() (err error) { if err != nil { return err } - err = srv.dns.PopulateCachesByRR(systemHostsFile.Records) + err = srv.dns.PopulateCachesByRR(systemHostsFile.Records, + systemHostsFile.Path) if err != nil { return err } @@ -75,7 +76,7 @@ func (srv *Server) Start() (err error) { } for _, hf := range srv.env.HostsFiles { - err = srv.dns.PopulateCachesByRR(hf.Records) + err = srv.dns.PopulateCachesByRR(hf.Records, hf.Path) if err != nil { return err } @@ -86,7 +87,7 @@ func (srv *Server) Start() (err error) { return err } for _, masterFile := range srv.env.ZoneFiles { - srv.dns.PopulateCaches(masterFile.Messages()) + srv.dns.PopulateCaches(masterFile.Messages(), masterFile.Path) } if len(srv.env.FileResolvConf) > 0 { |
