Skip to content

Commit

Permalink
gci write --skip-generated -s standard,default . libcni/api.go
Browse files Browse the repository at this point in the history
changed all these files

Signed-off-by: Michael Cambria <[email protected]>
  • Loading branch information
mccv1r0 committed Feb 8, 2023
1 parent 7ee6987 commit 6686e4b
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 62 deletions.
5 changes: 2 additions & 3 deletions libcni/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions libcni/backwards_compatibility_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 2 additions & 3 deletions libcni/conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions pkg/invoke/args_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 2 additions & 3 deletions pkg/invoke/delegate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 2 additions & 3 deletions pkg/invoke/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions pkg/invoke/find_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 2 additions & 3 deletions pkg/invoke/get_version_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 2 additions & 3 deletions pkg/invoke/raw_exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions pkg/ns/ns_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions pkg/skel/skel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions pkg/types/020/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 2 additions & 3 deletions pkg/types/040/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions pkg/types/100/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions pkg/types/args_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 2 additions & 3 deletions pkg/types/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions pkg/version/conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions pkg/version/legacy_examples/legacy_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions pkg/version/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 1 addition & 2 deletions pkg/version/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 2 additions & 3 deletions pkg/version/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 2 additions & 3 deletions plugins/debug/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 3 additions & 4 deletions plugins/test/noop/noop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 6686e4b

Please sign in to comment.