magellan/internal/util/strings.go
David Allen 12969adf25
Add support for storage command and crawler output
Partially addresses issue #3 by adding a simple `magellan list devices` command to list storage devices. To close the issue, this PR still requires including storage device information in the `crawler`'s output.

Reviewed-on: towk/magellan-ng#5
2025-07-10 20:56:02 -06:00

10 lines
219 B
Go

package util
import "strings"
func TidyJSON(s string) string {
s = strings.ReplaceAll(s, "\n", "")
s = strings.ReplaceAll(s, "\t", "")
s = strings.ReplaceAll(s, " ", "")
return strings.ReplaceAll(s, "\"", "'")
}