organize imports with gopls format

This commit is contained in:
Jakob Schrettenbrunner
2021-01-10 01:22:39 +00:00
parent 948d927eb9
commit 648072436f
48 changed files with 175 additions and 127 deletions

View File

@@ -2,15 +2,16 @@ package server
import (
"crypto/sha256"
"emperror.dev/errors"
"encoding/hex"
"github.com/mholt/archiver/v3"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/server/filesystem"
"io"
"io/ioutil"
"os"
"path/filepath"
"emperror.dev/errors"
"github.com/mholt/archiver/v3"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/server/filesystem"
)
// Archiver represents a Server Archiver.

View File

@@ -1,12 +1,13 @@
package server
import (
"io/ioutil"
"os"
"emperror.dev/errors"
"github.com/apex/log"
"github.com/pterodactyl/wings/api"
"github.com/pterodactyl/wings/server/backup"
"io/ioutil"
"os"
)
// Notifies the panel of a backup's state and returns an error if one is encountered

View File

@@ -1,8 +1,9 @@
package server
import (
"github.com/gammazero/workerpool"
"runtime"
"github.com/gammazero/workerpool"
)
// Parent function that will update all of the defined configuration files for a server

View File

@@ -1,8 +1,9 @@
package server
import (
"github.com/pterodactyl/wings/environment"
"sync"
"github.com/pterodactyl/wings/environment"
)
type Configuration struct {

View File

@@ -2,14 +2,15 @@ package server
import (
"context"
"emperror.dev/errors"
"fmt"
"github.com/mitchellh/colorstring"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/system"
"sync"
"sync/atomic"
"time"
"emperror.dev/errors"
"github.com/mitchellh/colorstring"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/system"
)
var ErrTooMuchConsoleData = errors.New("console is outputting too much data")
@@ -114,7 +115,7 @@ func (ct *ConsoleThrottler) Increment(onTrigger func()) error {
func (s *Server) Throttler() *ConsoleThrottler {
s.throttleOnce.Do(func() {
s.throttler = &ConsoleThrottler{
isThrottled: system.NewAtomicBool(false),
isThrottled: system.NewAtomicBool(false),
ConsoleThrottles: config.Get().Throttles,
}
})

View File

@@ -2,11 +2,12 @@ package server
import (
"fmt"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
"strconv"
"sync"
"time"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
)
type CrashHandler struct {

View File

@@ -1,8 +1,9 @@
package server
import (
"github.com/pterodactyl/wings/server/filesystem"
"os"
"github.com/pterodactyl/wings/server/filesystem"
)
func (s *Server) Filesystem() *filesystem.Filesystem {

View File

@@ -4,6 +4,13 @@ import (
"bufio"
"bytes"
"context"
"html/template"
"io"
"os"
"path/filepath"
"strconv"
"strings"
"emperror.dev/errors"
"github.com/apex/log"
"github.com/docker/docker/api/types"
@@ -14,12 +21,6 @@ import (
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
"github.com/pterodactyl/wings/system"
"html/template"
"io"
"os"
"path/filepath"
"strconv"
"strings"
)
// Executes the installation stack for a server process. Bubbles any errors up to the calling

View File

@@ -2,14 +2,15 @@ package server
import (
"encoding/json"
"regexp"
"strconv"
"sync"
"github.com/apex/log"
"github.com/pterodactyl/wings/api"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
"github.com/pterodactyl/wings/events"
"regexp"
"strconv"
"sync"
)
var dockerEvents = []string{

View File

@@ -1,9 +1,14 @@
package server
import (
"emperror.dev/errors"
"encoding/json"
"fmt"
"os"
"path/filepath"
"runtime"
"time"
"emperror.dev/errors"
"github.com/apex/log"
"github.com/gammazero/workerpool"
"github.com/pterodactyl/wings/api"
@@ -11,10 +16,6 @@ import (
"github.com/pterodactyl/wings/environment"
"github.com/pterodactyl/wings/environment/docker"
"github.com/pterodactyl/wings/server/filesystem"
"os"
"path/filepath"
"runtime"
"time"
)
var servers = NewCollection(nil)

View File

@@ -1,11 +1,12 @@
package server
import (
"path/filepath"
"strings"
"github.com/apex/log"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
"path/filepath"
"strings"
)
// To avoid confusion when working with mounts, assume that a server.Mount has not been properly

View File

@@ -2,12 +2,13 @@ package server
import (
"context"
"os"
"time"
"emperror.dev/errors"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
"golang.org/x/sync/semaphore"
"os"
"time"
)
type PowerAction string

View File

@@ -1,10 +1,11 @@
package server
import (
"github.com/pterodactyl/wings/environment"
"github.com/pterodactyl/wings/system"
"sync"
"sync/atomic"
"github.com/pterodactyl/wings/environment"
"github.com/pterodactyl/wings/system"
)
// Defines the current resource usage for a given server instance. If a server is offline you

View File

@@ -2,8 +2,11 @@ package server
import (
"context"
"emperror.dev/errors"
"fmt"
"strings"
"sync"
"emperror.dev/errors"
"github.com/apex/log"
"github.com/creasty/defaults"
"github.com/pterodactyl/wings/api"
@@ -14,8 +17,6 @@ import (
"github.com/pterodactyl/wings/server/filesystem"
"github.com/pterodactyl/wings/system"
"golang.org/x/sync/semaphore"
"strings"
"sync"
)
// High level definition for a server instance being controlled by Wings.

View File

@@ -2,12 +2,13 @@ package server
import (
"encoding/json"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
"io"
"io/ioutil"
"os"
"sync"
"github.com/pterodactyl/wings/config"
"github.com/pterodactyl/wings/environment"
)
var stateMutex sync.Mutex

View File

@@ -1,8 +1,9 @@
package server
import (
"emperror.dev/errors"
"encoding/json"
"emperror.dev/errors"
"github.com/buger/jsonparser"
"github.com/imdario/mergo"
"github.com/pterodactyl/wings/environment"

View File

@@ -2,8 +2,9 @@ package server
import (
"context"
"github.com/google/uuid"
"sync"
"github.com/google/uuid"
)
type WebsocketBag struct {