mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-04-05 08:54:09 -04:00
chore(lint): bump from v1.46.2 to v1.49.0
This commit is contained in:
@@ -2,7 +2,7 @@ ARG BUILDPLATFORM=linux/amd64
|
||||
ARG ALPINE_VERSION=3.16
|
||||
ARG GO_VERSION=1.17
|
||||
ARG XCPUTRANSLATE_VERSION=v0.7.0
|
||||
ARG GOLANGCI_LINT_VERSION=v1.46.2
|
||||
ARG GOLANGCI_LINT_VERSION=v1.49.0
|
||||
|
||||
FROM --platform=${BUILDPLATFORM} qmcgaw/xcputranslate:${XCPUTRANSLATE_VERSION} AS xcputranslate
|
||||
FROM --platform=${BUILDPLATFORM} qmcgaw/binpot:golangci-lint-${GOLANGCI_LINT_VERSION} AS golangci-lint
|
||||
|
||||
@@ -29,7 +29,12 @@ func NewServer(address string, logger logging.Logger, healthcheck func() error)
|
||||
|
||||
func (s *server) Run(ctx context.Context, done chan<- struct{}) {
|
||||
defer close(done)
|
||||
server := http.Server{Addr: s.address, Handler: s.handler}
|
||||
server := http.Server{
|
||||
Addr: s.address,
|
||||
Handler: s.handler,
|
||||
ReadHeaderTimeout: time.Second,
|
||||
ReadTimeout: time.Second,
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
s.logger.Warn("shutting down (context canceled)")
|
||||
|
||||
@@ -2,7 +2,6 @@ package params
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/qdm12/ddns-updater/internal/settings"
|
||||
@@ -25,7 +24,7 @@ func NewReader(logger logging.Logger) Reader {
|
||||
return &reader{
|
||||
logger: logger,
|
||||
env: params.New(),
|
||||
readFile: ioutil.ReadFile,
|
||||
readFile: os.ReadFile,
|
||||
writeFile: os.WriteFile,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,12 @@ func New(ctx context.Context, address, rootURL string, db data.Database, logger
|
||||
|
||||
func (s *server) Run(ctx context.Context, done chan<- struct{}) {
|
||||
defer close(done)
|
||||
server := http.Server{Addr: s.address, Handler: s.handler}
|
||||
server := http.Server{
|
||||
Addr: s.address,
|
||||
Handler: s.handler,
|
||||
ReadHeaderTimeout: time.Second,
|
||||
ReadTimeout: time.Second,
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
s.logger.Warn("shutting down (context canceled)")
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -132,7 +132,7 @@ func (p *provider) Update(ctx context.Context, client *http.Client, ip net.IP) (
|
||||
}
|
||||
defer response.Body.Close()
|
||||
|
||||
b, err := ioutil.ReadAll(response.Body)
|
||||
b, err := io.ReadAll(response.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w: %s", errors.ErrUnmarshalResponse, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user