Skip to content

Commit

Permalink
fix goland-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Laure-di committed Feb 29, 2024
1 parent b8dcc60 commit 585796d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion internal/namespaces/redis/v1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func GetCommands() *core.Commands {
cmds := GetGeneratedCommands()

human.RegisterMarshalerFunc(redis.Cluster{}, redisClusterGetMarshalerFunc)
human.RegisterMarshalerFunc(redis.Endpoint{}, redisEndpointsClusterGetMarshalerFunc)
human.RegisterMarshalerFunc(redis.Cluster{}.Endpoints, redisEndpointsClusterGetMarshalerFunc)

cmds.Merge(core.NewCommands(clusterWaitCommand()))
cmds.MustFind("redis", "cluster", "create").Override(clusterCreateBuilder)
Expand Down
10 changes: 6 additions & 4 deletions internal/namespaces/redis/v1/custom_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package redis
import (
"context"
"errors"
"log"
"net/http"
"reflect"
"time"
Expand Down Expand Up @@ -160,8 +159,11 @@ func ACLAddListBuilder(c *core.Command) *core.Command {
}

func redisEndpointsClusterGetMarshalerFunc(i interface{}, opt *human.MarshalOpt) (string, error) {
type tmp redis.Endpoint
endpoint := tmp(i.(redis.Endpoint))
if opt == nil {
return "", nil
}
type tmp []*redis.Endpoint
endpoint := tmp(i.([]*redis.Endpoint))
opt.Fields = []*human.MarshalFieldOpt{
{
FieldName: "ID",
Expand All @@ -176,7 +178,7 @@ func redisEndpointsClusterGetMarshalerFunc(i interface{}, opt *human.MarshalOpt)
Label: "IPs",
},
}
str, err := human.Marshal(redisEndpointsClusterResponse, opt)
str, err := human.Marshal(endpoint, opt)
if err != nil {
return "", err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Zone fr-par-1
UserName admin

Endpoints:
PORT IPS ID
6379 [163.172.151.197] 9212bfab-dead-42d6-80e2-5eaa4f8be5a6
ID Port IPs
9212bfab-dead-42d6-80e2-5eaa4f8be5a6 6379 [163.172.151.197]

ACLRules:
ID IP CIDR DESCRIPTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Zone fr-par-1
UserName admin

Endpoints:
PORT IPS ID
6379 [172.16.4.1] a56f3126-4e97-46cf-89c6-f179359f96e9
ID Port IPs
a56f3126-4e97-46cf-89c6-f179359f96e9 6379 [172.16.4.1]

ACLRules:
ID IP CIDR DESCRIPTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Zone fr-par-1
UserName admin

Endpoints:
PORT IPS ID
6379 [172.16.4.1] 13199053-663b-40e8-bf06-56161d32271b
6379 [10.16.4.1] 1ede35c6-c45a-4a24-b34b-0486a33c01f8
ID Port IPs
13199053-663b-40e8-bf06-56161d32271b 6379 [172.16.4.1]
1ede35c6-c45a-4a24-b34b-0486a33c01f8 6379 [10.16.4.1]

ACLRules:
ID IP CIDR DESCRIPTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Zone fr-par-1
UserName admin

Endpoints:
PORT IPS ID
6379 [10.16.4.1] 0b9e8061-e10c-4fb8-815d-1dfd94bf2745
6379 [172.16.228.2] c0be2bbb-d4d6-4043-9aaa-f8a96e1685dc
ID Port IPs
0b9e8061-e10c-4fb8-815d-1dfd94bf2745 6379 [10.16.4.1]
c0be2bbb-d4d6-4043-9aaa-f8a96e1685dc 6379 [172.16.228.2]

ACLRules:
ID IP CIDR DESCRIPTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Zone fr-par-1
UserName admin

Endpoints:
PORT IPS ID
6379 [172.16.232.2] 2aaf6524-7ce6-4f6e-96aa-3f5cdc24ce04
ID Port IPs
2aaf6524-7ce6-4f6e-96aa-3f5cdc24ce04 6379 [172.16.232.2]

ACLRules:
ID IP CIDR DESCRIPTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Zone fr-par-1
UserName admin

Endpoints:
PORT IPS ID
6379 [172.16.220.2] 003d16e6-7539-4058-9e59-b81b3fe8a4e6
6379 [172.16.208.2] e6ac24ff-015a-4d2a-a29e-4b2eae03b259
ID Port IPs
003d16e6-7539-4058-9e59-b81b3fe8a4e6 6379 [172.16.220.2]
e6ac24ff-015a-4d2a-a29e-4b2eae03b259 6379 [172.16.208.2]

ACLRules:
ID IP CIDR DESCRIPTION
Expand Down

0 comments on commit 585796d

Please sign in to comment.