Skip to content

Commit

Permalink
Run go fix on the project (spiffe#4607)
Browse files Browse the repository at this point in the history
* Run `go fix` on the project

Signed-off-by: Ryan Turner <[email protected]>

* Clean up imports

Signed-off-by: Ryan Turner <[email protected]>

---------

Signed-off-by: Ryan Turner <[email protected]>
Co-authored-by: Marcos Yacob <[email protected]>
  • Loading branch information
rturner3 and MarcosDY authored Oct 27, 2023
1 parent 00f2825 commit c942cc0
Show file tree
Hide file tree
Showing 151 changed files with 28 additions and 165 deletions.
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/api/api_posix_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package api

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/api/api_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package api

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/common/config_posix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package common

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/common/config_windows.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package common

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/common/defaults_posix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package common

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/common/defaults_windows.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package common

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/healthcheck/healthcheck_posix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package healthcheck

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/healthcheck/healthcheck_posix_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package healthcheck

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/healthcheck/healthcheck_windows.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package healthcheck

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package healthcheck

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/run/run_posix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package run

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/run/run_posix_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package run

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/run/run_windows.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package run

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-agent/cli/run/run_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package run

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/agent/agent_posix_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package agent_test

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/agent/agent_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package agent_test

Expand Down
2 changes: 1 addition & 1 deletion cmd/spire-server/cli/agent/count.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package agent

import (
"context"
"errors"
"flag"
"fmt"
Expand All @@ -10,7 +11,6 @@ import (
"github.com/spiffe/spire/cmd/spire-server/util"
commoncli "github.com/spiffe/spire/pkg/common/cli"
"github.com/spiffe/spire/pkg/common/cliprinter"
"golang.org/x/net/context"
)

type countCommand struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/spire-server/cli/agent/evict.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package agent

import (
"context"
"errors"
"flag"

Expand All @@ -11,7 +12,6 @@ import (
commoncli "github.com/spiffe/spire/pkg/common/cli"
"github.com/spiffe/spire/pkg/common/cliprinter"
"github.com/spiffe/spire/pkg/server/api"
"golang.org/x/net/context"
)

type evictCommand struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/spire-server/cli/agent/list.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package agent

import (
"context"
"errors"
"flag"
"fmt"
Expand All @@ -13,7 +14,6 @@ import (
commoncli "github.com/spiffe/spire/pkg/common/cli"
"github.com/spiffe/spire/pkg/common/cliprinter"
"github.com/spiffe/spire/pkg/common/idutil"
"golang.org/x/net/context"
)

type listCommand struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/spire-server/cli/agent/purge.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package agent

import (
"context"
"flag"
"fmt"
"time"
Expand All @@ -13,7 +14,6 @@ import (
commoncli "github.com/spiffe/spire/pkg/common/cli"
"github.com/spiffe/spire/pkg/common/cliprinter"
"github.com/spiffe/spire/pkg/common/idutil"
"golang.org/x/net/context"
"google.golang.org/protobuf/types/known/wrapperspb"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/spire-server/cli/agent/show.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package agent

import (
"context"
"errors"
"flag"

Expand All @@ -12,7 +13,6 @@ import (
commoncli "github.com/spiffe/spire/pkg/common/cli"
"github.com/spiffe/spire/pkg/common/cliprinter"
"github.com/spiffe/spire/pkg/server/api"
"golang.org/x/net/context"
)

type showCommand struct {
Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/bundle/bundle_posix_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package bundle

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/bundle/bundle_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package bundle

Expand Down
3 changes: 1 addition & 2 deletions cmd/spire-server/cli/bundle/count.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package bundle

import (
"context"
"flag"
"fmt"

Expand All @@ -10,8 +11,6 @@ import (
bundlev1 "github.com/spiffe/spire-api-sdk/proto/spire/api/server/bundle/v1"
"github.com/spiffe/spire/cmd/spire-server/util"
commoncli "github.com/spiffe/spire/pkg/common/cli"

"golang.org/x/net/context"
)

type countCommand struct {
Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/common/common_posix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package common

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/common/common_windows.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package common

Expand Down
6 changes: 2 additions & 4 deletions cmd/spire-server/cli/entry/count.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
package entry

import (
"context"
"flag"
"fmt"

"github.com/mitchellh/cli"
"github.com/spiffe/spire/pkg/common/cliprinter"

entryv1 "github.com/spiffe/spire-api-sdk/proto/spire/api/server/entry/v1"
"github.com/spiffe/spire/cmd/spire-server/util"
commoncli "github.com/spiffe/spire/pkg/common/cli"

"golang.org/x/net/context"
"github.com/spiffe/spire/pkg/common/cliprinter"
)

type countCommand struct {
Expand Down
3 changes: 1 addition & 2 deletions cmd/spire-server/cli/entry/create.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package entry

import (
"context"
"errors"
"flag"

Expand All @@ -12,8 +13,6 @@ import (
"github.com/spiffe/spire/pkg/common/cliprinter"
"github.com/spiffe/spire/pkg/common/idutil"
"google.golang.org/grpc/codes"

"golang.org/x/net/context"
)

// NewCreateCommand creates a new "create" subcommand for "entry" command.
Expand Down
3 changes: 1 addition & 2 deletions cmd/spire-server/cli/entry/delete.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package entry

import (
"context"
"encoding/json"
"errors"
"flag"
Expand All @@ -13,8 +14,6 @@ import (
commoncli "github.com/spiffe/spire/pkg/common/cli"
"github.com/spiffe/spire/pkg/common/cliprinter"
"google.golang.org/grpc/codes"

"golang.org/x/net/context"
)

// NewDeleteCommand creates a new "delete" subcommand for "entry" command.
Expand Down
3 changes: 1 addition & 2 deletions cmd/spire-server/cli/entry/show.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package entry

import (
"context"
"errors"
"flag"
"fmt"
Expand All @@ -13,8 +14,6 @@ import (
"github.com/spiffe/spire/pkg/common/cliprinter"
commonutil "github.com/spiffe/spire/pkg/common/util"
"google.golang.org/protobuf/types/known/wrapperspb"

"golang.org/x/net/context"
)

const listEntriesRequestPageSize = 500
Expand Down
3 changes: 1 addition & 2 deletions cmd/spire-server/cli/entry/update.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package entry

import (
"context"
"errors"
"flag"

Expand All @@ -11,8 +12,6 @@ import (
commoncli "github.com/spiffe/spire/pkg/common/cli"
"github.com/spiffe/spire/pkg/common/cliprinter"
"google.golang.org/grpc/codes"

"golang.org/x/net/context"
)

// NewUpdateCommand creates a new "update" subcommand for "entry" command.
Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/entry/util_posix_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package entry

Expand Down
2 changes: 1 addition & 1 deletion cmd/spire-server/cli/entry/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package entry

import (
"bytes"
"context"
"os"
"path"
"testing"
Expand All @@ -15,7 +16,6 @@ import (
"github.com/spiffe/spire/test/util"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/entry/util_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package entry

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/federation/util_posix_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package federation

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/federation/util_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package federation

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/healthcheck/healthcheck_posix_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package healthcheck

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package healthcheck

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/run/run_posix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package run

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/run/run_posix_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !windows
// +build !windows

package run

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/run/run_windows.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package run

Expand Down
1 change: 0 additions & 1 deletion cmd/spire-server/cli/run/run_windows_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build windows
// +build windows

package run

Expand Down
Loading

0 comments on commit c942cc0

Please sign in to comment.