Skip to content

Commit

Permalink
Indent JSON files (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
avorima authored Feb 23, 2023
1 parent 494e167 commit ff141a4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion grafana/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func PullDashboard(grafanaURL string, apiKey string, directory string, tag strin
continue
}
rawBoard.ID = 0
b, err := json.Marshal(rawBoard)
b, err := json.MarshalIndent(rawBoard, "", " ")
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion grafana/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func PullDatasources(grafanaURL string, apiKey string, directory string) error {
}

for _, datasource := range datasources {
b, err := json.Marshal(datasource)
b, err := json.MarshalIndent(datasource, "", " ")
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion grafana/folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func PullFolders(grafanaURL string, apiKey string, directory string) error {
}

for _, folder := range folders {
b, err := json.Marshal(folder)
b, err := json.MarshalIndent(folder, "", " ")
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion grafana/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func PullNotifications(grafanaURL string, apiKey string, directory string) error
}

for _, notification := range notifications {
b, err := json.Marshal(notification)
b, err := json.MarshalIndent(notification, "", " ")
if err != nil {
return err
}
Expand Down

0 comments on commit ff141a4

Please sign in to comment.