summaryrefslogtreecommitdiff
path: root/digitalocean/json.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-03 12:40:31 -0600
committerJeff Carr <[email protected]>2024-01-03 12:40:31 -0600
commite14770e94c9ec126a3d418d6d2b2f15ef8cf1607 (patch)
tree12b223cbe9cb9c6ef98b23d8bf6ae96e2040b3d7 /digitalocean/json.go
parent1324717de0a1ccd830ca34aa03e0faa9e6d93a83 (diff)
fixed stuff
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'digitalocean/json.go')
-rw-r--r--digitalocean/json.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/digitalocean/json.go b/digitalocean/json.go
deleted file mode 100644
index c0aa1a8..0000000
--- a/digitalocean/json.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package digitalocean
-
-import (
- "encoding/json"
-)
-
-// formatJSON takes an unformatted JSON string and returns a formatted version.
-func FormatJSON(unformattedJSON string) (string, error) {
- var jsonData interface{}
-
- // Decode the JSON string into an interface
- err := json.Unmarshal([]byte(unformattedJSON), &jsonData)
- if err != nil {
- return "", err
- }
-
- // Re-encode the JSON with indentation for formatting
- formattedJSON, err := json.MarshalIndent(jsonData, "", " ")
- if err != nil {
- return "", err
- }
-
- return string(formattedJSON), nil
-}