run gofumpt
This commit is contained in:
@@ -31,7 +31,7 @@ type Allocations struct {
|
||||
//
|
||||
// You'll want to use DockerBindings() if you need to re-map 127.0.0.1 to the Docker interface.
|
||||
func (a *Allocations) Bindings() nat.PortMap {
|
||||
var out = nat.PortMap{}
|
||||
out := nat.PortMap{}
|
||||
|
||||
for ip, ports := range a.Mappings {
|
||||
for _, port := range ports {
|
||||
@@ -94,7 +94,7 @@ func (a *Allocations) DockerBindings() nat.PortMap {
|
||||
// To accomplish this, we'll just get the values from "DockerBindings" and then set them
|
||||
// to empty structs. Because why not.
|
||||
func (a *Allocations) Exposed() nat.PortSet {
|
||||
var out = nat.PortSet{}
|
||||
out := nat.PortSet{}
|
||||
|
||||
for port := range a.DockerBindings() {
|
||||
out[port] = struct{}{}
|
||||
|
||||
@@ -14,8 +14,10 @@ import (
|
||||
"github.com/pterodactyl/wings/config"
|
||||
)
|
||||
|
||||
var _conce sync.Once
|
||||
var _client *client.Client
|
||||
var (
|
||||
_conce sync.Once
|
||||
_client *client.Client
|
||||
)
|
||||
|
||||
// Docker returns a docker client to be used throughout the codebase. Once a
|
||||
// client has been created it will be returned for all subsequent calls to this
|
||||
|
||||
@@ -114,7 +114,6 @@ func (e *Environment) Events() *events.EventBus {
|
||||
// ID auto-assigned when the container is created.
|
||||
func (e *Environment) Exists() (bool, error) {
|
||||
_, err := e.client.ContainerInspect(context.Background(), e.Id)
|
||||
|
||||
if err != nil {
|
||||
// If this error is because the container instance wasn't found via Docker we
|
||||
// can safely ignore the error and just return false.
|
||||
|
||||
Reference in New Issue
Block a user