chore: run gofumpt

This commit is contained in:
Matthew Penner 2022-10-05 17:24:11 -06:00
parent 984bd10cf2
commit 3f481e9540
No known key found for this signature in database
14 changed files with 32 additions and 17 deletions

View File

@ -5,8 +5,6 @@ import (
"crypto/tls"
"errors"
"fmt"
"github.com/pterodactyl/wings/internal/cron"
"github.com/pterodactyl/wings/internal/database"
log2 "log"
"net/http"
_ "net/http/pprof"
@ -18,6 +16,9 @@ import (
"strings"
"time"
"github.com/pterodactyl/wings/internal/cron"
"github.com/pterodactyl/wings/internal/database"
"github.com/NYTimes/logrotate"
"github.com/apex/log"
"github.com/apex/log/handlers/multi"

View File

@ -2,6 +2,7 @@ package cron
import (
"context"
"emperror.dev/errors"
"github.com/pterodactyl/wings/internal/database"
"github.com/pterodactyl/wings/internal/models"

View File

@ -2,13 +2,14 @@ package cron
import (
"context"
"time"
"emperror.dev/errors"
log2 "github.com/apex/log"
"github.com/go-co-op/gocron"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/server"
"github.com/pterodactyl/wings/system"
"time"
)
const ErrCronRunning = errors.Sentinel("cron: job already running")

View File

@ -2,12 +2,13 @@ package cron
import (
"context"
"reflect"
"emperror.dev/errors"
"github.com/pterodactyl/wings/internal/database"
"github.com/pterodactyl/wings/internal/models"
"github.com/pterodactyl/wings/server"
"github.com/pterodactyl/wings/system"
"reflect"
)
type sftpCron struct {

View File

@ -1,6 +1,9 @@
package database
import (
"path/filepath"
"time"
"emperror.dev/errors"
"github.com/glebarez/sqlite"
"github.com/pterodactyl/wings/config"
@ -8,12 +11,12 @@ import (
"github.com/pterodactyl/wings/system"
"gorm.io/gorm"
"gorm.io/gorm/logger"
"path/filepath"
"time"
)
var o system.AtomicBool
var db *gorm.DB
var (
o system.AtomicBool
db *gorm.DB
)
// Initialize configures the local SQLite database for Wings and ensures that the models have
// been fully migrated.

View File

@ -1,9 +1,10 @@
package models
import (
"time"
"github.com/pterodactyl/wings/system"
"gorm.io/gorm"
"time"
)
type Event string

View File

@ -2,6 +2,7 @@ package models
import (
"database/sql"
"emperror.dev/errors"
"github.com/goccy/go-json"
)

View File

@ -4,13 +4,14 @@ import (
"bytes"
"context"
"fmt"
"github.com/pterodactyl/wings/internal/models"
"io"
"net/http"
"strconv"
"strings"
"time"
"github.com/pterodactyl/wings/internal/models"
"emperror.dev/errors"
"github.com/apex/log"
"github.com/cenkalti/backoff/v4"

View File

@ -3,7 +3,6 @@ package router
import (
"bufio"
"context"
"github.com/pterodactyl/wings/internal/models"
"io"
"mime/multipart"
"net/http"
@ -14,6 +13,8 @@ import (
"strconv"
"strings"
"github.com/pterodactyl/wings/internal/models"
"github.com/pterodactyl/wings/config"
"emperror.dev/errors"

View File

@ -3,12 +3,13 @@ package websocket
import (
"context"
"fmt"
"github.com/pterodactyl/wings/internal/models"
"net/http"
"strings"
"sync"
"time"
"github.com/pterodactyl/wings/internal/models"
"emperror.dev/errors"
"github.com/apex/log"
"github.com/gbrlsnchs/jwt/v3"

View File

@ -2,10 +2,11 @@ package server
import (
"context"
"time"
"emperror.dev/errors"
"github.com/pterodactyl/wings/internal/database"
"github.com/pterodactyl/wings/internal/models"
"time"
)
const ActivityPowerPrefix = "server:power."

View File

@ -5,8 +5,6 @@ import (
"archive/zip"
"compress/gzip"
"fmt"
gzip2 "github.com/klauspost/compress/gzip"
zip2 "github.com/klauspost/compress/zip"
"os"
"path"
"path/filepath"
@ -15,6 +13,9 @@ import (
"sync/atomic"
"time"
gzip2 "github.com/klauspost/compress/gzip"
zip2 "github.com/klauspost/compress/zip"
"emperror.dev/errors"
"github.com/mholt/archiver/v3"
)

View File

@ -449,7 +449,7 @@ func (ip *InstallationProcess) Execute() (string, error) {
},
Privileged: true,
NetworkMode: container.NetworkMode(config.Get().Docker.Network.Mode),
UsernsMode: container.UsernsMode(config.Get().Docker.UsernsMode),
UsernsMode: container.UsernsMode(config.Get().Docker.UsernsMode),
}
// Ensure the root directory for the server exists properly before attempting

View File

@ -1,9 +1,10 @@
package main
import (
"github.com/pterodactyl/wings/cmd"
"math/rand"
"time"
"github.com/pterodactyl/wings/cmd"
)
func main() {