Skip to content

Commit

Permalink
Apply go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Dec 27, 2024
1 parent 14a5f5c commit 4df1dc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion couchdb-exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func TestCouchdbStatsV1Integration(t *testing.T) {
}
}

func awaitMembership(t *testing.T,localOnly bool, basicAuth lib.BasicAuth) func(address string) (bool, error) {
func awaitMembership(t *testing.T, localOnly bool, basicAuth lib.BasicAuth) func(address string) (bool, error) {
time.Sleep(5 * time.Second)

return func(address string) (bool, error) {
Expand Down
6 changes: 3 additions & 3 deletions lib/couchdb-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (httpError *HttpError) Error() string {
type MembershipResponse struct {
AllNodes []string `json:"all_nodes"`
ClusterNodes []string `json:"cluster_nodes"`
SingleNode string `json:"name"`
SingleNode string `json:"name"`
}

func (c *CouchdbClient) getNodeInfo(uri string) (NodeInfo, error) {
Expand Down Expand Up @@ -84,7 +84,7 @@ func (c *CouchdbClient) isCouchDbV1() (bool, error) {
func (c *CouchdbClient) GetNodeNames(localOnly bool) ([]string, error) {
var nodeDiscovery string = "_membership"
if localOnly {
nodeDiscovery="_node/_local"
nodeDiscovery = "_node/_local"
}
data, err := c.Request("GET", fmt.Sprintf("%s/%s", c.BaseUri, nodeDiscovery), nil)
if err != nil {
Expand All @@ -96,7 +96,7 @@ func (c *CouchdbClient) GetNodeNames(localOnly bool) ([]string, error) {
return nil, err
}
if localOnly {
membership.ClusterNodes=append(membership.ClusterNodes,membership.SingleNode)
membership.ClusterNodes = append(membership.ClusterNodes, membership.SingleNode)
}
// for i, name := range membership.ClusterNodes {
// slog.Infof("node[%d]: %s\n", i, name)
Expand Down

0 comments on commit 4df1dc5

Please sign in to comment.