Skip to content

Commit 16ec6fa

Browse files
committed
chore: execute goimports to format the code
Signed-off-by: findfluctuate <findfluctuate@outlook.com>
1 parent ee537a2 commit 16ec6fa

File tree

7 files changed

+33
-30
lines changed

7 files changed

+33
-30
lines changed

starship/cmd/starship/connect.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ package main
33
import (
44
"context"
55
"fmt"
6-
"go.uber.org/zap"
76
"os"
87
"os/exec"
98
"strings"
109
"sync"
10+
11+
"go.uber.org/zap"
1112
)
1213

1314
// File responsible for having functions that will perform kubectl port-froward.

starship/cmd/starship/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package main
22

33
import (
4-
"gopkg.in/yaml.v3"
54
"os"
65

76
"go.uber.org/zap"
7+
"gopkg.in/yaml.v3"
88
"helm.sh/helm/v3/pkg/cli"
99
)
1010

starship/cmd/starship/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"fmt"
5+
56
"github.com/urfave/cli/v2"
67
)
78

starship/exposer/handler_relayer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package main
33
import (
44
"context"
55
"fmt"
6-
"go.uber.org/zap"
76

87
pb "github.com/hyperweb-io/starship/exposer/exposer"
8+
"go.uber.org/zap"
99
)
1010

1111
// CreateChannel function runs the hermes command to create a channel between 2 given chains

starship/registry/model.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package main
22

33
import (
4-
pb "github.com/hyperweb-io/starship/registry/registry"
54
"sort"
65
"strings"
6+
7+
pb "github.com/hyperweb-io/starship/registry/registry"
78
)
89

910
type ChannelPort struct {

starship/tests/e2e/exposer_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import (
44
"bytes"
55
"encoding/json"
66
"fmt"
7-
"github.com/golang/protobuf/jsonpb"
8-
"github.com/golang/protobuf/proto"
9-
"google.golang.org/protobuf/types/known/structpb"
107
"net/http"
118
urlpkg "net/url"
129

10+
"github.com/golang/protobuf/jsonpb"
11+
"github.com/golang/protobuf/proto"
1312
pb "github.com/hyperweb-io/starship/exposer/exposer"
13+
"google.golang.org/protobuf/types/known/structpb"
1414
)
1515

1616
func (s *TestSuite) MakeExposerRequest(chain *Chain, req *http.Request, unmarshal proto.Message) {
@@ -48,7 +48,7 @@ func (s *TestSuite) TestExposer_GetGenesisFile() {
4848
s.T().Log("running test for /genesis endpoint for exposer")
4949

5050
chain := s.config.Chains[0]
51-
if chain.Ports.Exposer == 0{
51+
if chain.Ports.Exposer == 0 {
5252
s.T().Skip("skipping /node_id test since no exposer")
5353
}
5454
if chain.Name == "solana" {

starship/tests/e2e/solana_test.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ type VoteAccount struct {
3131

3232
// ClusterNode represents a cluster node
3333
type ClusterNode struct {
34-
Pubkey string `json:"pubkey"`
35-
Gossip string `json:"gossip"`
36-
TPU string `json:"tpu"`
37-
TPUForwards string `json:"tpuForwards"`
38-
TVU string `json:"tvu"`
39-
RPC string `json:"rpc"`
40-
Pubsub string `json:"pubsub"`
41-
Version string `json:"version"`
42-
FeatureSet uint32 `json:"featureSet"`
34+
Pubkey string `json:"pubkey"`
35+
Gossip string `json:"gossip"`
36+
TPU string `json:"tpu"`
37+
TPUForwards string `json:"tpuForwards"`
38+
TVU string `json:"tvu"`
39+
RPC string `json:"rpc"`
40+
Pubsub string `json:"pubsub"`
41+
Version string `json:"version"`
42+
FeatureSet uint32 `json:"featureSet"`
4343
ShredVersion uint16 `json:"shredVersion"`
4444
}
4545

@@ -57,7 +57,7 @@ func (s *TestSuite) MakeSolanaRPCRequest(method string, params []interface{}, re
5757
break
5858
}
5959
}
60-
60+
6161
if solanaChain == nil {
6262
s.T().Skip("Solana chain not found in config")
6363
}
@@ -93,7 +93,7 @@ func (s *TestSuite) MakeSolanaExposerRequest(endpoint string, response interface
9393
break
9494
}
9595
}
96-
96+
9797
if solanaChain == nil {
9898
s.T().Skip("Solana chain not found in config")
9999
}
@@ -118,7 +118,7 @@ func (s *TestSuite) TestSolana_Status() {
118118
break
119119
}
120120
}
121-
121+
122122
if solanaChain == nil {
123123
s.T().Skip("Solana chain not found in config")
124124
}
@@ -175,14 +175,14 @@ func (s *TestSuite) TestSolana_VoteAccounts() {
175175
// Parse the result
176176
result := response.Result.(map[string]interface{})
177177
current := result["current"].([]interface{})
178-
178+
179179
// Assert that we have at least one vote account (bootstrap validator)
180180
s.Require().GreaterOrEqual(len(current), 1, "Should have at least one active vote account")
181181

182182
// Log vote account details
183183
for i, account := range current {
184184
acc := account.(map[string]interface{})
185-
s.T().Logf("Vote Account %d: %s (Node: %s, Stake: %v)",
185+
s.T().Logf("Vote Account %d: %s (Node: %s, Stake: %v)",
186186
i+1, acc["votePubkey"], acc["nodePubkey"], acc["activatedStake"])
187187
}
188188
}
@@ -200,14 +200,14 @@ func (s *TestSuite) TestSolana_ClusterNodes() {
200200

201201
// Parse the result
202202
nodes := response.Result.([]interface{})
203-
203+
204204
// Assert that we have at least one node
205205
s.Require().GreaterOrEqual(len(nodes), 1, "Should have at least one cluster node")
206206

207207
// Log cluster node details
208208
for i, node := range nodes {
209209
n := node.(map[string]interface{})
210-
s.T().Logf("Cluster Node %d: %s (Gossip: %s, RPC: %s, Version: %s)",
210+
s.T().Logf("Cluster Node %d: %s (Gossip: %s, RPC: %s, Version: %s)",
211211
i+1, n["pubkey"], n["gossip"], n["rpc"], n["version"])
212212
}
213213
}
@@ -244,7 +244,7 @@ func (s *TestSuite) TestSolana_Faucet() {
244244
s.Require().Nil(balanceResponse.Error, "RPC should not return error")
245245
s.Require().Equal("2.0", balanceResponse.JSONRPC)
246246
s.Require().Equal(1, balanceResponse.ID)
247-
247+
248248
// Parse balance result
249249
balanceResult := balanceResponse.Result.(map[string]interface{})
250250
balance := balanceResult["value"].(float64)
@@ -289,7 +289,7 @@ func (s *TestSuite) TestSolana_ValidatorCount() {
289289
result := response.Result.(map[string]interface{})
290290
current := result["current"].([]interface{})
291291
delinquent := result["delinquent"].([]interface{})
292-
292+
293293
currentValidators := len(current)
294294
delinquentValidators := len(delinquent)
295295
totalValidators := currentValidators + delinquentValidators
@@ -300,7 +300,7 @@ func (s *TestSuite) TestSolana_ValidatorCount() {
300300

301301
// Assert that we have at least the bootstrap validator
302302
s.Require().GreaterOrEqual(currentValidators, 1, "Should have at least one current validator (bootstrap)")
303-
303+
304304
// If you have multiple validators configured, check for them
305305
var solanaChain *Chain
306306
for _, chain := range s.config.Chains {
@@ -309,10 +309,10 @@ func (s *TestSuite) TestSolana_ValidatorCount() {
309309
break
310310
}
311311
}
312-
312+
313313
if solanaChain != nil && solanaChain.NumValidators > 1 {
314314
expectedValidators := solanaChain.NumValidators
315-
s.Require().GreaterOrEqual(totalValidators, expectedValidators,
315+
s.Require().GreaterOrEqual(totalValidators, expectedValidators,
316316
fmt.Sprintf("Should have at least %d validators", expectedValidators))
317317
}
318318
}
@@ -344,4 +344,4 @@ func (s *TestSuite) TestSolana_NetworkHealth() {
344344
s.Require().NotNil(response.Result, fmt.Sprintf("%s should return result", test.name))
345345
})
346346
}
347-
}
347+
}

0 commit comments

Comments
 (0)