Make lint happy
This commit is contained in:
1 parent
42fa953053
commit
3bdfa9b050
2 files changed
+14
-11
No files matched your search
+2
-2
@@ -371,7 +371,7 @@ func (c *Cache) Len() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return the max capacity
|
// Return the max capacity
|
||||||
func (c Cache) Capacity() int {
|
func (c *Cache) Capacity() int {
|
||||||
c.lock.RLock()
|
c.lock.RLock()
|
||||||
defer c.lock.RUnlock()
|
defer c.lock.RUnlock()
|
||||||
|
|
||||||
@@ -379,7 +379,7 @@ func (c Cache) Capacity() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return the max capacity
|
// Return the max capacity
|
||||||
func (c Cache) String() string {
|
func (c *Cache) String() string {
|
||||||
c.lock.RLock()
|
c.lock.RLock()
|
||||||
defer c.lock.RUnlock()
|
defer c.lock.RUnlock()
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ type mockedZoneWithRecords struct {
|
|||||||
func newMockedZoneWithRecords(zr []ZoneRecord) *mockedZoneWithRecords {
|
func newMockedZoneWithRecords(zr []ZoneRecord) *mockedZoneWithRecords {
|
||||||
return &mockedZoneWithRecords{records: zr}
|
return &mockedZoneWithRecords{records: zr}
|
||||||
}
|
}
|
||||||
func (mz mockedZoneWithRecords) Domain() string { return DefaultLocalDomain }
|
func (mz *mockedZoneWithRecords) Domain() string { return DefaultLocalDomain }
|
||||||
func (mz *mockedZoneWithRecords) LookupName(name string) ([]ZoneRecord, error) {
|
func (mz *mockedZoneWithRecords) LookupName(name string) ([]ZoneRecord, error) {
|
||||||
Debug.Printf("[mocked zone]: LookupName: returning records %s", mz.records)
|
Debug.Printf("[mocked zone]: LookupName: returning records %s", mz.records)
|
||||||
mz.Lock()
|
mz.Lock()
|
||||||
@@ -63,26 +63,29 @@ func (mz *mockedZoneWithRecords) LookupInaddr(inaddr string) ([]ZoneRecord, erro
|
|||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mz mockedZoneWithRecords) DomainLookupName(name string) ([]ZoneRecord, error) {
|
func (mz *mockedZoneWithRecords) DomainLookupName(name string) ([]ZoneRecord, error) {
|
||||||
return mz.LookupName(name)
|
return mz.LookupName(name)
|
||||||
}
|
}
|
||||||
func (mz mockedZoneWithRecords) DomainLookupInaddr(inaddr string) ([]ZoneRecord, error) {
|
func (mz *mockedZoneWithRecords) DomainLookupInaddr(inaddr string) ([]ZoneRecord, error) {
|
||||||
return mz.LookupInaddr(inaddr)
|
return mz.LookupInaddr(inaddr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// the following methods are not currently needed...
|
// the following methods are not currently needed...
|
||||||
func (mz mockedZoneWithRecords) AddRecord(ident string, name string, ip net.IP) error {
|
func (mz *mockedZoneWithRecords) AddRecord(ident string, name string, ip net.IP) error {
|
||||||
notImplWarn()
|
notImplWarn()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (mz mockedZoneWithRecords) DeleteRecord(ident string, ip net.IP) error { notImplWarn(); return nil }
|
func (mz *mockedZoneWithRecords) DeleteRecord(ident string, ip net.IP) error {
|
||||||
func (mz mockedZoneWithRecords) DeleteRecordsFor(ident string) error { notImplWarn(); return nil }
|
|
||||||
func (mz mockedZoneWithRecords) Status() string { notImplWarn(); return "nothing" }
|
|
||||||
func (mz mockedZoneWithRecords) ObserveName(name string, observer ZoneRecordObserver) error {
|
|
||||||
notImplWarn()
|
notImplWarn()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
func (mz mockedZoneWithRecords) ObserveInaddr(inaddr string, observer ZoneRecordObserver) error {
|
func (mz *mockedZoneWithRecords) DeleteRecordsFor(ident string) error { notImplWarn(); return nil }
|
||||||
|
func (mz *mockedZoneWithRecords) Status() string { notImplWarn(); return "nothing" }
|
||||||
|
func (mz *mockedZoneWithRecords) ObserveName(name string, observer ZoneRecordObserver) error {
|
||||||
|
notImplWarn()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (mz *mockedZoneWithRecords) ObserveInaddr(inaddr string, observer ZoneRecordObserver) error {
|
||||||
notImplWarn()
|
notImplWarn()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user