mirror of https://github.com/knative/func.git
chore: update files with goimport (#513)
* chore: update files with goimport This should get https://github.com/knative-sandbox/kn-plugin-func/pull/509 happy and green. Signed-off-by: Lance Ball <lball@redhat.com> * fixup: remove extraneous print statements Signed-off-by: Lance Ball <lball@redhat.com>
This commit is contained in:
parent
eb17fb819c
commit
71368c6a1d
|
@ -8,9 +8,9 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
"runtime"
|
|
||||||
|
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,6 +2,7 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/AlecAivazis/survey/v2"
|
"github.com/AlecAivazis/survey/v2"
|
||||||
"github.com/AlecAivazis/survey/v2/terminal"
|
"github.com/AlecAivazis/survey/v2/terminal"
|
||||||
"github.com/ory/viper"
|
"github.com/ory/viper"
|
||||||
|
|
|
@ -4,15 +4,16 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/Netflix/go-expect"
|
|
||||||
"github.com/hinshun/vt10x"
|
|
||||||
"github.com/spf13/cobra"
|
|
||||||
fn "knative.dev/kn-plugin-func"
|
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/Netflix/go-expect"
|
||||||
|
"github.com/hinshun/vt10x"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
fn "knative.dev/kn-plugin-func"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mockFunctionLoaderSaver struct {
|
type mockFunctionLoaderSaver struct {
|
||||||
|
@ -107,7 +108,6 @@ func TestNewConfigLabelsCmd(t *testing.T) {
|
||||||
|
|
||||||
run := createRunFunc(cmd, t)
|
run := createRunFunc(cmd, t)
|
||||||
|
|
||||||
|
|
||||||
p := func(k, v string) fn.Label {
|
p := func(k, v string) fn.Label {
|
||||||
return fn.Label{Key: &k, Value: &v}
|
return fn.Label{Key: &k, Value: &v}
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,6 @@ func TestNewConfigLabelsCmd(t *testing.T) {
|
||||||
assertLabel(fn.Labels{p("e", "f"), p("c", "d")})
|
assertLabel(fn.Labels{p("e", "f"), p("c", "d")})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestListLabels(t *testing.T) {
|
func TestListLabels(t *testing.T) {
|
||||||
|
|
||||||
p := func(k, v string) fn.Label {
|
p := func(k, v string) fn.Label {
|
||||||
|
|
|
@ -2,10 +2,11 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"knative.dev/kn-plugin-func/cmd"
|
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
|
"knative.dev/kn-plugin-func/cmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Statically-populated build metadata set
|
// Statically-populated build metadata set
|
||||||
|
|
|
@ -3,12 +3,13 @@ package docker
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/containers/image/v5/types"
|
|
||||||
"github.com/docker/docker-credential-helpers/client"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/containers/image/v5/types"
|
||||||
|
"github.com/docker/docker-credential-helpers/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetCredentialsFromCredsStore(registry string) (types.DockerAuthConfig, error) {
|
func GetCredentialsFromCredsStore(registry string) (types.DockerAuthConfig, error) {
|
||||||
|
|
|
@ -27,4 +27,3 @@ func Test_to2ndLevelDomain(t *testing.T) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ import (
|
||||||
"k8s.io/client-go/tools/clientcmd"
|
"k8s.io/client-go/tools/clientcmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func NewKubernetesClientset(namespace string) (*kubernetes.Clientset, error) {
|
func NewKubernetesClientset(namespace string) (*kubernetes.Clientset, error) {
|
||||||
|
|
||||||
restConfig, err := GetClientConfig().ClientConfig()
|
restConfig, err := GetClientConfig().ClientConfig()
|
||||||
|
|
|
@ -2,6 +2,7 @@ package knative
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
clientservingv1 "knative.dev/client/pkg/serving/v1"
|
clientservingv1 "knative.dev/client/pkg/serving/v1"
|
||||||
"knative.dev/pkg/apis"
|
"knative.dev/pkg/apis"
|
||||||
|
|
|
@ -2,6 +2,7 @@ package mock
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
fn "knative.dev/kn-plugin-func"
|
fn "knative.dev/kn-plugin-func"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package mock
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
fn "knative.dev/kn-plugin-func"
|
fn "knative.dev/kn-plugin-func"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package mock
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
fn "knative.dev/kn-plugin-func"
|
fn "knative.dev/kn-plugin-func"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package e2e
|
package e2e
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/apimachinery/pkg/util/wait"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ReadyCheck waits deployed function to report as ready.
|
// ReadyCheck waits deployed function to report as ready.
|
||||||
|
|
|
@ -73,7 +73,6 @@ func (f *TestShellCmdRunner) FromDir(dir string) *TestShellCmdRunner {
|
||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Exec invokes go exec library and runs a shell command combining the binary args with args from method signature
|
// Exec invokes go exec library and runs a shell command combining the binary args with args from method signature
|
||||||
func (f *TestShellCmdRunner) Exec(args ...string) TestShellCmdResult {
|
func (f *TestShellCmdRunner) Exec(args ...string) TestShellCmdResult {
|
||||||
finalArgs := f.BinaryArgs
|
finalArgs := f.BinaryArgs
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
package custom
|
|
@ -0,0 +1 @@
|
||||||
|
package custom
|
Loading…
Reference in New Issue