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
This commit is contained in:
David Allen 2025-05-03 16:58:17 -06:00
parent 461c006d75
commit 2596e8945f
Signed by: towk
GPG key ID: 0430CDBE22619155
5 changed files with 77 additions and 1 deletions

10
internal/util/strings.go Normal file
View file

@ -0,0 +1,10 @@
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, "\"", "'")
}