Skip to content

Commit 4df1dc5

Browse files
committed
Apply go fmt
1 parent 14a5f5c commit 4df1dc5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

couchdb-exporter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func TestCouchdbStatsV1Integration(t *testing.T) {
281281
}
282282
}
283283

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

287287
return func(address string) (bool, error) {

lib/couchdb-client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (httpError *HttpError) Error() string {
4242
type MembershipResponse struct {
4343
AllNodes []string `json:"all_nodes"`
4444
ClusterNodes []string `json:"cluster_nodes"`
45-
SingleNode string `json:"name"`
45+
SingleNode string `json:"name"`
4646
}
4747

4848
func (c *CouchdbClient) getNodeInfo(uri string) (NodeInfo, error) {
@@ -84,7 +84,7 @@ func (c *CouchdbClient) isCouchDbV1() (bool, error) {
8484
func (c *CouchdbClient) GetNodeNames(localOnly bool) ([]string, error) {
8585
var nodeDiscovery string = "_membership"
8686
if localOnly {
87-
nodeDiscovery="_node/_local"
87+
nodeDiscovery = "_node/_local"
8888
}
8989
data, err := c.Request("GET", fmt.Sprintf("%s/%s", c.BaseUri, nodeDiscovery), nil)
9090
if err != nil {
@@ -96,7 +96,7 @@ func (c *CouchdbClient) GetNodeNames(localOnly bool) ([]string, error) {
9696
return nil, err
9797
}
9898
if localOnly {
99-
membership.ClusterNodes=append(membership.ClusterNodes,membership.SingleNode)
99+
membership.ClusterNodes = append(membership.ClusterNodes, membership.SingleNode)
100100
}
101101
// for i, name := range membership.ClusterNodes {
102102
// slog.Infof("node[%d]: %s\n", i, name)

0 commit comments

Comments
 (0)