Skip to content

Commit 13f4ecd

Browse files
committed
style: run gofmt on the entire project to fix CI formatting check
1 parent 11a574c commit 13f4ecd

198 files changed

Lines changed: 1395 additions & 1427 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmd/broker.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"text/tabwriter"
2525
"time"
2626

27-
"github.com/google/uuid"
2827
"github.com/GoogleCloudPlatform/scion/pkg/apiclient"
2928
"github.com/GoogleCloudPlatform/scion/pkg/brokercredentials"
3029
"github.com/GoogleCloudPlatform/scion/pkg/config"
@@ -33,6 +32,7 @@ import (
3332
"github.com/GoogleCloudPlatform/scion/pkg/hubsync"
3433
"github.com/GoogleCloudPlatform/scion/pkg/util"
3534
"github.com/GoogleCloudPlatform/scion/pkg/version"
35+
"github.com/google/uuid"
3636
"github.com/spf13/cobra"
3737
)
3838

@@ -58,10 +58,10 @@ var (
5858
brokerRestartDebug bool
5959

6060
// broker provide/withdraw flags
61-
brokerGroveID string
62-
brokerBrokerID string // --broker flag for remote broker operations
63-
brokerMakeDefault bool // --make-default flag to set broker as grove default
64-
brokerHubFlag string // --hub flag to target a specific hub connection
61+
brokerGroveID string
62+
brokerBrokerID string // --broker flag for remote broker operations
63+
brokerMakeDefault bool // --make-default flag to set broker as grove default
64+
brokerHubFlag string // --hub flag to target a specific hub connection
6565

6666
// broker hubs flags
6767
brokerHubsJSON bool
@@ -1966,7 +1966,7 @@ func getHubClientForConnection(name string) (hubclient.Client, error) {
19661966
// for CLI use without importing the runtimebroker package.
19671967
type BrokerHubConnectionsResponse struct {
19681968
Connections []BrokerHubConnectionInfo `json:"connections"`
1969-
Mode string `json:"mode"`
1969+
Mode string `json:"mode"`
19701970
}
19711971

19721972
// BrokerHubConnectionInfo mirrors runtimebroker.HubConnectionInfo for CLI use.

cmd/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,15 +388,15 @@ func runSettingsMigration() error {
388388

389389
if isJSONOutput() {
390390
type jsonResult struct {
391-
Label string `json:"label"`
391+
Label string `json:"label"`
392392
Result *config.MigrationResult `json:"result"`
393393
}
394394
var jsonResults []jsonResult
395395
for i, r := range results {
396396
jsonResults = append(jsonResults, jsonResult{Label: labels[i], Result: r})
397397
}
398398
return outputJSON(map[string]interface{}{
399-
"results": jsonResults,
399+
"results": jsonResults,
400400
"nothing_to_migrate": allSkipped && migrationErr == nil,
401401
})
402402
}

cmd/hub_env.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import (
2222
"strings"
2323
"time"
2424

25-
"github.com/google/uuid"
2625
"github.com/GoogleCloudPlatform/scion/pkg/config"
2726
"github.com/GoogleCloudPlatform/scion/pkg/hubclient"
27+
"github.com/google/uuid"
2828
"github.com/spf13/cobra"
2929
)
3030

cmd/hub_notifications.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import (
2525
)
2626

2727
var (
28-
notificationsShowAll bool
29-
notificationsJSON bool
30-
notificationsAckAll bool
28+
notificationsShowAll bool
29+
notificationsJSON bool
30+
notificationsAckAll bool
3131
)
3232

3333
// hubNotificationsCmd lists notifications for the current user

cmd/message_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ func newMessageMockHubServer(t *testing.T, groveID string, runningAgents []hubcl
9292
}
9393

9494
var body struct {
95-
Message string `json:"message"`
95+
Message string `json:"message"`
9696
StructuredMessage *messages.StructuredMessage `json:"structured_message"`
97-
Interrupt bool `json:"interrupt"`
97+
Interrupt bool `json:"interrupt"`
9898
}
9999
json.NewDecoder(r.Body).Decode(&body)
100100

@@ -321,12 +321,12 @@ func TestSendMessageViaHub_SingleAgentError(t *testing.T) {
321321

322322
func TestScheduleMessageFlagValidation(t *testing.T) {
323323
tests := []struct {
324-
name string
325-
in string
326-
at string
324+
name string
325+
in string
326+
at string
327327
broadcast bool
328-
all bool
329-
wantErr string
328+
all bool
329+
wantErr string
330330
}{
331331
{
332332
name: "in and at are mutually exclusive",
@@ -414,8 +414,8 @@ func TestSendMessageViaHub_BroadcastPartialFailure(t *testing.T) {
414414

415415
var body struct {
416416
StructuredMessage *messages.StructuredMessage `json:"structured_message"`
417-
Message string `json:"message"`
418-
Interrupt bool `json:"interrupt"`
417+
Message string `json:"message"`
418+
Interrupt bool `json:"interrupt"`
419419
}
420420
json.NewDecoder(r.Body).Decode(&body)
421421
msg := body.Message
@@ -523,8 +523,8 @@ func TestSendMessageViaHub_NotifyFlag(t *testing.T) {
523523
case r.Method == http.MethodPost:
524524
var body struct {
525525
StructuredMessage *messages.StructuredMessage `json:"structured_message"`
526-
Interrupt bool `json:"interrupt"`
527-
Notify bool `json:"notify"`
526+
Interrupt bool `json:"interrupt"`
527+
Notify bool `json:"notify"`
528528
}
529529
json.NewDecoder(r.Body).Decode(&body)
530530
mu.Lock()

cmd/output.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,20 @@ var jsonNoOpCommands = map[string]bool{
8585

8686
// interactiveOnlyCommands maps command paths to the reason they cannot support --format json.
8787
var interactiveOnlyCommands = map[string]string{
88-
"scion attach": "it requires an interactive terminal session",
89-
"scion logs": "it produces streaming output",
90-
"scion broker start": "it runs a long-running server process",
91-
"scion broker stop": "it manages a daemon process",
92-
"scion broker register": "it requires interactive prompts",
93-
"scion broker deregister": "it requires interactive prompts",
94-
"scion broker provide": "it requires interactive prompts",
95-
"scion broker withdraw": "it requires interactive prompts",
96-
"scion server start": "it runs a long-running server process",
97-
"scion server stop": "it manages a server process",
98-
"scion server status": "it manages a server process",
99-
"scion message": "it is used for internal agent messaging",
100-
"scion msg": "it is used for internal agent messaging",
101-
"scion cdw": "it is a shell integration command",
102-
"scion hub auth login": "it requires interactive browser authentication",
103-
"scion hub auth logout": "it manages authentication state",
88+
"scion attach": "it requires an interactive terminal session",
89+
"scion logs": "it produces streaming output",
90+
"scion broker start": "it runs a long-running server process",
91+
"scion broker stop": "it manages a daemon process",
92+
"scion broker register": "it requires interactive prompts",
93+
"scion broker deregister": "it requires interactive prompts",
94+
"scion broker provide": "it requires interactive prompts",
95+
"scion broker withdraw": "it requires interactive prompts",
96+
"scion server start": "it runs a long-running server process",
97+
"scion server stop": "it manages a server process",
98+
"scion server status": "it manages a server process",
99+
"scion message": "it is used for internal agent messaging",
100+
"scion msg": "it is used for internal agent messaging",
101+
"scion cdw": "it is a shell integration command",
102+
"scion hub auth login": "it requires interactive browser authentication",
103+
"scion hub auth logout": "it manages authentication state",
104104
}

cmd/output_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ func TestOutputActionResult(t *testing.T) {
113113
os.Stderr = stderrW
114114

115115
result := ActionResult{
116-
Status: "success",
117-
Command: "test",
118-
Message: "test message",
116+
Status: "success",
117+
Command: "test",
118+
Message: "test message",
119119
Warnings: []string{"warning 1"},
120120
}
121121
err := outputActionResult(result)

cmd/sciontool/commands/init.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,9 +821,9 @@ func gitCloneWorkspace(uid, gid int) error {
821821
if hubClient := hub.NewClient(); hubClient != nil && hubClient.IsConfigured() {
822822
hubCtx, hubCancel := context.WithTimeout(context.Background(), 10*time.Second)
823823
hubClient.UpdateStatus(hubCtx, hub.StatusUpdate{
824-
Phase: state.PhaseCloning,
825-
Status: string(state.PhaseCloning),
826-
Message: "Cloning repository",
824+
Phase: state.PhaseCloning,
825+
Status: string(state.PhaseCloning),
826+
Message: "Cloning repository",
827827
Metadata: map[string]string{
828828
"repository": normalizedURL,
829829
"branch": branch,

cmd/sciontool/commands/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"fmt"
88
"os"
99

10-
"github.com/spf13/cobra"
1110
"github.com/GoogleCloudPlatform/scion/pkg/sciontool/log"
11+
"github.com/spf13/cobra"
1212
)
1313

1414
var (

cmd/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ import (
3838
"github.com/GoogleCloudPlatform/scion/pkg/agent"
3939
"github.com/GoogleCloudPlatform/scion/pkg/agent/state"
4040
"github.com/GoogleCloudPlatform/scion/pkg/api"
41-
"github.com/GoogleCloudPlatform/scion/pkg/broker"
4241
"github.com/GoogleCloudPlatform/scion/pkg/apiclient"
42+
"github.com/GoogleCloudPlatform/scion/pkg/broker"
4343
"github.com/GoogleCloudPlatform/scion/pkg/brokercredentials"
4444
"github.com/GoogleCloudPlatform/scion/pkg/config"
4545
"github.com/GoogleCloudPlatform/scion/pkg/daemon"

0 commit comments

Comments
 (0)