fmt: fix imports formatting

- run gofmt and goimports
This commit is contained in:
stefanprodan 2020-02-28 12:52:23 +02:00
parent 19faf67523
commit a30f688450
12 changed files with 22 additions and 12 deletions

View File

@ -2,12 +2,13 @@ package main
import (
"flag"
"log"
"time"
"github.com/weaveworks/flagger/pkg/loadtester"
"github.com/weaveworks/flagger/pkg/logger"
"github.com/weaveworks/flagger/pkg/signals"
"go.uber.org/zap"
"log"
"time"
)
var VERSION = "0.12.1"

View File

@ -2,6 +2,7 @@ package controller
import (
"fmt"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
corev1 "k8s.io/api/core/v1"

View File

@ -2,6 +2,7 @@ package controller
import (
"fmt"
flaggerv1 "github.com/weaveworks/flagger/pkg/apis/flagger/v1beta1"
clientset "github.com/weaveworks/flagger/pkg/client/clientset/versioned"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@ -7,12 +7,13 @@ import (
"errors"
"fmt"
"io/ioutil"
"k8s.io/utils/clock"
"net/http"
"net/url"
"strconv"
"time"
"k8s.io/utils/clock"
flaggerv1 "github.com/weaveworks/flagger/pkg/apis/flagger/v1beta1"
)

View File

@ -2,10 +2,11 @@ package loadtester
import (
"context"
"go.uber.org/zap"
"sync"
"sync/atomic"
"time"
"go.uber.org/zap"
)
type TaskRunner struct {

View File

@ -1,9 +1,10 @@
package loadtester
import (
"github.com/weaveworks/flagger/pkg/logger"
"testing"
"time"
"github.com/weaveworks/flagger/pkg/logger"
)
func TestTaskRunner_Start(t *testing.T) {

View File

@ -179,7 +179,6 @@ func ListenAndServe(port string, timeout time.Duration, logger *zap.SugaredLogge
return
}
canaryName := fmt.Sprintf("rollback.%s.%s", canary.Name, canary.Namespace)
gate.close(canaryName)

View File

@ -3,9 +3,10 @@ package loadtester
import (
"context"
"encoding/hex"
"go.uber.org/zap"
"hash/fnv"
"sync"
"go.uber.org/zap"
)
// Modeling a loadtester task

View File

@ -6,12 +6,13 @@ import (
"encoding/json"
"errors"
"fmt"
"go.uber.org/zap"
"io/ioutil"
"net/http"
"net/url"
"strconv"
"time"
"go.uber.org/zap"
)
const TaskTypeNGrinder = "ngrinder"

View File

@ -3,10 +3,11 @@ package loadtester
import (
"context"
"fmt"
"github.com/weaveworks/flagger/pkg/logger"
"gopkg.in/h2non/gock.v1"
"testing"
"time"
"github.com/weaveworks/flagger/pkg/logger"
"gopkg.in/h2non/gock.v1"
)
func TestTaskNGrinder(t *testing.T) {

View File

@ -4,9 +4,10 @@ import (
"context"
"errors"
"fmt"
"go.uber.org/zap"
"os/exec"
"strconv"
"go.uber.org/zap"
)
const TaskTypeShell = "cmd"

View File

@ -1,8 +1,9 @@
package observers
import (
flaggerv1 "github.com/weaveworks/flagger/pkg/apis/flagger/v1beta1"
"time"
flaggerv1 "github.com/weaveworks/flagger/pkg/apis/flagger/v1beta1"
)
type Interface interface {