run gofumpt
This commit is contained in:
parent
067ca5bb60
commit
3a738e44d6
|
@ -218,7 +218,7 @@ func (e *Environment) WaitForStop(ctx context.Context, duration time.Duration, t
|
|||
}
|
||||
}()
|
||||
|
||||
doTermination := func (s string) error {
|
||||
doTermination := func(s string) error {
|
||||
e.log().WithField("step", s).WithField("duration", duration).Warn("container stop did not complete in time, terminating process...")
|
||||
return e.Terminate(ctx, os.Kill)
|
||||
}
|
||||
|
|
1
go.mod
1
go.mod
|
@ -34,7 +34,6 @@ require (
|
|||
github.com/mholt/archiver/v3 v3.5.0
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||
github.com/pkg/profile v1.6.0
|
||||
github.com/pkg/sftp v1.13.2
|
||||
github.com/sabhiram/go-gitignore v0.0.0-20201211210132-54b8a0bf510f
|
||||
github.com/spf13/cobra v1.2.1
|
||||
|
|
2
go.sum
2
go.sum
|
@ -704,8 +704,6 @@ github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV
|
|||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/profile v1.6.0 h1:hUDfIISABYI59DyeB3OTay/HxSRwTQ8rB/H83k6r5dM=
|
||||
github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
|
||||
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
|
||||
github.com/pkg/sftp v1.13.2 h1:taJnKntsWgU+qae21Rx52lIwndAdKrj0mfUNQsz1z4Q=
|
||||
github.com/pkg/sftp v1.13.2/go.mod h1:LzqnAvaD5TWeNBsZpfKxSYn1MbjWwOsCIAFFJbpIsK8=
|
||||
|
|
|
@ -13,8 +13,8 @@ import (
|
|||
"time"
|
||||
|
||||
"emperror.dev/errors"
|
||||
"github.com/google/uuid"
|
||||
"github.com/goccy/go-json"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/pterodactyl/wings/server"
|
||||
)
|
||||
|
|
|
@ -3,7 +3,6 @@ package router
|
|||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"github.com/pterodactyl/wings/config"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
|
@ -14,6 +13,8 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/pterodactyl/wings/config"
|
||||
|
||||
"emperror.dev/errors"
|
||||
"github.com/apex/log"
|
||||
"github.com/gin-gonic/gin"
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
ws "github.com/gorilla/websocket"
|
||||
"github.com/goccy/go-json"
|
||||
ws "github.com/gorilla/websocket"
|
||||
|
||||
"github.com/pterodactyl/wings/router/middleware"
|
||||
"github.com/pterodactyl/wings/router/websocket"
|
||||
|
|
|
@ -19,7 +19,7 @@ func TestName(t *testing.T) {
|
|||
})
|
||||
|
||||
g.It("calls strike once per time period", func() {
|
||||
t := newConsoleThrottle(1, time.Millisecond * 20)
|
||||
t := newConsoleThrottle(1, time.Millisecond*20)
|
||||
|
||||
var times int
|
||||
t.strike = func() {
|
||||
|
@ -53,7 +53,7 @@ func TestName(t *testing.T) {
|
|||
}
|
||||
|
||||
func BenchmarkConsoleThrottle(b *testing.B) {
|
||||
t := newConsoleThrottle(10, time.Millisecond * 10)
|
||||
t := newConsoleThrottle(10, time.Millisecond*10)
|
||||
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
|
|
|
@ -42,7 +42,6 @@ func (l *Locker) Acquire() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
|
||||
// TryAcquire will attempt to acquire a power-lock until the context provided
|
||||
// is canceled.
|
||||
func (l *Locker) TryAcquire(ctx context.Context) error {
|
||||
|
|
|
@ -95,7 +95,7 @@ func TestPower(t *testing.T) {
|
|||
|
||||
l.Acquire()
|
||||
go func() {
|
||||
time.AfterFunc(time.Millisecond * 50, func() {
|
||||
time.AfterFunc(time.Millisecond*50, func() {
|
||||
l.Release()
|
||||
})
|
||||
}()
|
||||
|
|
|
@ -47,7 +47,7 @@ func TestRate(t *testing.T) {
|
|||
g.It("resets back to zero when called", func() {
|
||||
r := NewRate(10, time.Second)
|
||||
for i := 0; i < 100; i++ {
|
||||
if i % 10 == 0 {
|
||||
if i%10 == 0 {
|
||||
r.Reset()
|
||||
}
|
||||
g.Assert(r.Try()).IsTrue()
|
||||
|
|
Loading…
Reference in New Issue
Block a user