mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-04-05 08:54:09 -04:00
chore(lint): add new linters fatcontext, intrange and mirror
This commit is contained in:
@@ -37,8 +37,7 @@ type provider interface {
|
||||
get(ctx context.Context, ip netip.Addr) (result Result, err error)
|
||||
}
|
||||
|
||||
//nolint:ireturn
|
||||
func newProvider(providerName Provider, client *http.Client) provider {
|
||||
func newProvider(providerName Provider, client *http.Client) provider { //nolint:ireturn
|
||||
switch providerName {
|
||||
case Ipinfo:
|
||||
return newIpinfo(client)
|
||||
|
||||
@@ -4,7 +4,8 @@ import (
|
||||
"sync/atomic"
|
||||
)
|
||||
|
||||
func (f *Fetcher) getSubFetcher() ipFetcher { //nolint:ireturn
|
||||
//nolint:ireturn
|
||||
func (f *Fetcher) getSubFetcher() ipFetcher {
|
||||
fetcher := f.fetchers[0]
|
||||
if len(f.fetchers) > 1 { // cycling effect
|
||||
index := int(atomic.AddUint32(f.counter, 1)) % len(f.fetchers)
|
||||
|
||||
Reference in New Issue
Block a user