From 6686e4b85da5ae2937c64e878028d93d2c47fce5 Mon Sep 17 00:00:00 2001 From: Michael Cambria Date: Wed, 8 Feb 2023 15:44:03 -0500 Subject: [PATCH] gci write --skip-generated -s standard,default . libcni/api.go changed all these files Signed-off-by: Michael Cambria --- libcni/api_test.go | 5 ++--- libcni/backwards_compatibility_test.go | 5 ++--- libcni/conf_test.go | 5 ++--- pkg/invoke/args_test.go | 3 +-- pkg/invoke/delegate_test.go | 5 ++--- pkg/invoke/exec_test.go | 5 ++--- pkg/invoke/find_test.go | 3 +-- pkg/invoke/get_version_integration_test.go | 5 ++--- pkg/invoke/raw_exec_test.go | 5 ++--- pkg/ns/ns_linux.go | 3 +-- pkg/skel/skel_test.go | 5 ++--- pkg/types/020/types_test.go | 5 ++--- pkg/types/040/types_test.go | 5 ++--- pkg/types/100/types_test.go | 5 ++--- pkg/types/args_test.go | 3 +-- pkg/types/types_test.go | 5 ++--- pkg/version/conf_test.go | 3 +-- pkg/version/legacy_examples/legacy_examples_test.go | 3 +-- pkg/version/plugin_test.go | 3 +-- pkg/version/reconcile_test.go | 3 +-- pkg/version/version_test.go | 5 ++--- plugins/debug/main.go | 5 ++--- plugins/test/noop/noop_test.go | 7 +++---- 23 files changed, 39 insertions(+), 62 deletions(-) diff --git a/libcni/api_test.go b/libcni/api_test.go index 408b5919f..fd8111d6a 100644 --- a/libcni/api_test.go +++ b/libcni/api_test.go @@ -27,14 +27,13 @@ import ( "strings" "time" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/libcni" "github.com/containernetworking/cni/pkg/skel" "github.com/containernetworking/cni/pkg/types" current "github.com/containernetworking/cni/pkg/types/100" noop_debug "github.com/containernetworking/cni/plugins/test/noop/debug" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) type pluginInfo struct { diff --git a/libcni/backwards_compatibility_test.go b/libcni/backwards_compatibility_test.go index 531b1d29e..0b55a7368 100644 --- a/libcni/backwards_compatibility_test.go +++ b/libcni/backwards_compatibility_test.go @@ -23,12 +23,11 @@ import ( "runtime" "strings" + "github.com/containernetworking/cni/libcni" + "github.com/containernetworking/cni/pkg/version/legacy_examples" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" - - "github.com/containernetworking/cni/libcni" - "github.com/containernetworking/cni/pkg/version/legacy_examples" ) var _ = Describe("Backwards compatibility", func() { diff --git a/libcni/conf_test.go b/libcni/conf_test.go index ab5c6203a..1b918bd5a 100644 --- a/libcni/conf_test.go +++ b/libcni/conf_test.go @@ -19,11 +19,10 @@ import ( "os" "path/filepath" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/libcni" "github.com/containernetworking/cni/pkg/types" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) var _ = Describe("Loading configuration from disk", func() { diff --git a/pkg/invoke/args_test.go b/pkg/invoke/args_test.go index fd790f398..efe7ffa35 100644 --- a/pkg/invoke/args_test.go +++ b/pkg/invoke/args_test.go @@ -17,10 +17,9 @@ package invoke_test import ( "os" + "github.com/containernetworking/cni/pkg/invoke" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - - "github.com/containernetworking/cni/pkg/invoke" ) var _ = Describe("CNIArgs AsEnv", func() { diff --git a/pkg/invoke/delegate_test.go b/pkg/invoke/delegate_test.go index c3dae1a6d..fc9061185 100644 --- a/pkg/invoke/delegate_test.go +++ b/pkg/invoke/delegate_test.go @@ -21,12 +21,11 @@ import ( "os" "path/filepath" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/pkg/invoke" current "github.com/containernetworking/cni/pkg/types/100" "github.com/containernetworking/cni/plugins/test/noop/debug" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) var _ = Describe("Delegate", func() { diff --git a/pkg/invoke/exec_test.go b/pkg/invoke/exec_test.go index 51ac4fb07..824817a07 100644 --- a/pkg/invoke/exec_test.go +++ b/pkg/invoke/exec_test.go @@ -19,13 +19,12 @@ import ( "encoding/json" "errors" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/pkg/invoke" "github.com/containernetworking/cni/pkg/invoke/fakes" current "github.com/containernetworking/cni/pkg/types/100" "github.com/containernetworking/cni/pkg/version" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) var _ = Describe("Executing a plugin, unit tests", func() { diff --git a/pkg/invoke/find_test.go b/pkg/invoke/find_test.go index 2e59caa0a..3c1dc30ec 100644 --- a/pkg/invoke/find_test.go +++ b/pkg/invoke/find_test.go @@ -20,10 +20,9 @@ import ( "path/filepath" "strings" + "github.com/containernetworking/cni/pkg/invoke" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - - "github.com/containernetworking/cni/pkg/invoke" ) var _ = Describe("FindInPath", func() { diff --git a/pkg/invoke/get_version_integration_test.go b/pkg/invoke/get_version_integration_test.go index 0e2a4ad92..0f663d037 100644 --- a/pkg/invoke/get_version_integration_test.go +++ b/pkg/invoke/get_version_integration_test.go @@ -20,12 +20,11 @@ import ( "path/filepath" "runtime" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/pkg/invoke" "github.com/containernetworking/cni/pkg/version" "github.com/containernetworking/cni/pkg/version/testhelpers" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) var _ = Describe("GetVersion, integration tests", func() { diff --git a/pkg/invoke/raw_exec_test.go b/pkg/invoke/raw_exec_test.go index d1ea087d3..0dcf203be 100644 --- a/pkg/invoke/raw_exec_test.go +++ b/pkg/invoke/raw_exec_test.go @@ -19,11 +19,10 @@ import ( "context" "os" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/pkg/invoke" noop_debug "github.com/containernetworking/cni/plugins/test/noop/debug" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) var _ = Describe("RawExec", func() { diff --git a/pkg/ns/ns_linux.go b/pkg/ns/ns_linux.go index 3d58e75d6..f2dc9d791 100644 --- a/pkg/ns/ns_linux.go +++ b/pkg/ns/ns_linux.go @@ -17,9 +17,8 @@ package ns import ( "runtime" - "github.com/vishvananda/netns" - "github.com/containernetworking/cni/pkg/types" + "github.com/vishvananda/netns" ) // Returns an object representing the current OS thread's network namespace diff --git a/pkg/skel/skel_test.go b/pkg/skel/skel_test.go index b54efe263..931d7e158 100644 --- a/pkg/skel/skel_test.go +++ b/pkg/skel/skel_test.go @@ -20,12 +20,11 @@ import ( "fmt" "strings" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/pkg/types" current "github.com/containernetworking/cni/pkg/types/100" "github.com/containernetworking/cni/pkg/version" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) type fakeCmd struct { diff --git a/pkg/types/020/types_test.go b/pkg/types/020/types_test.go index caa409c81..bb724c8f2 100644 --- a/pkg/types/020/types_test.go +++ b/pkg/types/020/types_test.go @@ -19,12 +19,11 @@ import ( "fmt" "net" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/pkg/types" "github.com/containernetworking/cni/pkg/types/020" "github.com/containernetworking/cni/pkg/types/create" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) func testResult(resultCNIVersion, jsonCNIVersion string) (*types020.Result, string) { diff --git a/pkg/types/040/types_test.go b/pkg/types/040/types_test.go index 9a8d2ae58..576a10f66 100644 --- a/pkg/types/040/types_test.go +++ b/pkg/types/040/types_test.go @@ -20,12 +20,11 @@ import ( "net" "os" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/pkg/types" types020 "github.com/containernetworking/cni/pkg/types/020" types040 "github.com/containernetworking/cni/pkg/types/040" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) func testResult() *types040.Result { diff --git a/pkg/types/100/types_test.go b/pkg/types/100/types_test.go index 94bd29d3a..3a8c6b52d 100644 --- a/pkg/types/100/types_test.go +++ b/pkg/types/100/types_test.go @@ -20,11 +20,10 @@ import ( "net" "os" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/pkg/types" current "github.com/containernetworking/cni/pkg/types/100" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) func testResult() *current.Result { diff --git a/pkg/types/args_test.go b/pkg/types/args_test.go index 00329a957..914850c22 100644 --- a/pkg/types/args_test.go +++ b/pkg/types/args_test.go @@ -18,10 +18,9 @@ import ( "net" "reflect" + . "github.com/containernetworking/cni/pkg/types" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - - . "github.com/containernetworking/cni/pkg/types" ) var _ = Describe("UnmarshallableBool UnmarshalText", func() { diff --git a/pkg/types/types_test.go b/pkg/types/types_test.go index 4fed4a67e..877c9b876 100644 --- a/pkg/types/types_test.go +++ b/pkg/types/types_test.go @@ -18,11 +18,10 @@ import ( "encoding/json" "net" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/pkg/types" current "github.com/containernetworking/cni/pkg/types/100" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) var _ = Describe("Types", func() { diff --git a/pkg/version/conf_test.go b/pkg/version/conf_test.go index c27c9b000..f57b5e2a7 100644 --- a/pkg/version/conf_test.go +++ b/pkg/version/conf_test.go @@ -15,10 +15,9 @@ package version_test import ( + "github.com/containernetworking/cni/pkg/version" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - - "github.com/containernetworking/cni/pkg/version" ) var _ = Describe("Decoding the version of network config", func() { diff --git a/pkg/version/legacy_examples/legacy_examples_test.go b/pkg/version/legacy_examples/legacy_examples_test.go index 998482a12..d6146cac5 100644 --- a/pkg/version/legacy_examples/legacy_examples_test.go +++ b/pkg/version/legacy_examples/legacy_examples_test.go @@ -19,10 +19,9 @@ import ( "path/filepath" "runtime" + "github.com/containernetworking/cni/pkg/version/legacy_examples" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - - "github.com/containernetworking/cni/pkg/version/legacy_examples" ) var _ = Describe("The v0.1.0 Example", func() { diff --git a/pkg/version/plugin_test.go b/pkg/version/plugin_test.go index 21a987a68..99bf6cad0 100644 --- a/pkg/version/plugin_test.go +++ b/pkg/version/plugin_test.go @@ -15,10 +15,9 @@ package version_test import ( + "github.com/containernetworking/cni/pkg/version" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - - "github.com/containernetworking/cni/pkg/version" ) var _ = Describe("Decoding versions reported by a plugin", func() { diff --git a/pkg/version/reconcile_test.go b/pkg/version/reconcile_test.go index 5b6019d1f..00c7dd095 100644 --- a/pkg/version/reconcile_test.go +++ b/pkg/version/reconcile_test.go @@ -15,10 +15,9 @@ package version_test import ( + "github.com/containernetworking/cni/pkg/version" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - - "github.com/containernetworking/cni/pkg/version" ) var _ = Describe("Reconcile versions of net config with versions supported by plugins", func() { diff --git a/pkg/version/version_test.go b/pkg/version/version_test.go index 99c99cc7f..0a302f276 100644 --- a/pkg/version/version_test.go +++ b/pkg/version/version_test.go @@ -19,12 +19,11 @@ import ( "net" "reflect" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/containernetworking/cni/pkg/types" current "github.com/containernetworking/cni/pkg/types/100" "github.com/containernetworking/cni/pkg/version" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" ) var _ = Describe("Version operations", func() { diff --git a/plugins/debug/main.go b/plugins/debug/main.go index 917af99f9..df5856a95 100644 --- a/plugins/debug/main.go +++ b/plugins/debug/main.go @@ -21,13 +21,12 @@ import ( "os" "os/exec" - "github.com/containernetworking/plugins/pkg/ns" - bv "github.com/containernetworking/plugins/pkg/utils/buildversion" - "github.com/containernetworking/cni/pkg/skel" "github.com/containernetworking/cni/pkg/types" type100 "github.com/containernetworking/cni/pkg/types/100" "github.com/containernetworking/cni/pkg/version" + "github.com/containernetworking/plugins/pkg/ns" + bv "github.com/containernetworking/plugins/pkg/utils/buildversion" ) type NetConf struct { diff --git a/plugins/test/noop/noop_test.go b/plugins/test/noop/noop_test.go index 101829786..8d4604d72 100644 --- a/plugins/test/noop/noop_test.go +++ b/plugins/test/noop/noop_test.go @@ -20,14 +20,13 @@ import ( "os/exec" "strings" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gexec" - "github.com/containernetworking/cni/pkg/skel" "github.com/containernetworking/cni/pkg/types" "github.com/containernetworking/cni/pkg/version" noop_debug "github.com/containernetworking/cni/plugins/test/noop/debug" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + "github.com/onsi/gomega/gexec" ) var _ = Describe("No-op plugin", func() {