I am not sure how to do this or word this. I have a variable that returns a string something like this:
unixCommands := exec.Command("ls", "/bin")
unixCommandsout, err := unixCommands.Output()
unixCommandsstring := string(unixCommandsout)
fmt.Printf(unixCommandsstring)
Output:
unicode_start
unicode_stop
unlink
usleep
vi
view
ypdomainname
zcat
I'm looking for creating a JSON array or whatever is easiest to get to this final output:
["unicode_start", "unicode_stop", "unlink", "usleep", "vi", "view", "ypdomainname", "zcat"]