Skip to content

Commit

Permalink
remove some output
Browse files Browse the repository at this point in the history
  • Loading branch information
identw committed Jun 1, 2024
1 parent 166c709 commit dd0fcae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions pkg/aws/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os"
"sync"
"strings"
// "encoding/json"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
Expand Down Expand Up @@ -85,9 +84,6 @@ func (a *AWSClouds) getServers() {

for _, reservation := range result.Reservations {
for _, instance := range reservation.Instances {
// data, _ := json.MarshalIndent(instance, "", " ")
// fmt.Println(string(data))

publicIP := ""
privateIP := ""
if instance.PublicIpAddress != nil {
Expand Down
6 changes: 1 addition & 5 deletions pkg/hetznercloud/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
// "strings"
"sync"
"os"
"encoding/json"
"context"

"github.com/hetznercloud/hcloud-go/v2/hcloud"
Expand Down Expand Up @@ -55,7 +54,7 @@ func NewHetznerClouds(clientClouds []ClientConfig) (*HetznerClouds) {
}

func (h *HetznerClouds) getServers() {
for i, c := range h.clients {
for _, c := range h.clients {
servers, _, err := c.client.Server.List(context.Background(), hcloud.ServerListOpts{})
if err != nil {
fmt.Fprintf(os.Stderr, "Error reading hcloud servers: %v\n", err)
Expand All @@ -73,9 +72,6 @@ func (h *HetznerClouds) getServers() {
})
}
updateServerList.Unlock()
fmt.Printf("%d servers\n", i)
data, _ := json.MarshalIndent(h.servers, "", " ")
fmt.Println(string(data))
}
}

Expand Down

0 comments on commit dd0fcae

Please sign in to comment.