I'm trying to find files that end in hello.go
statement:= "find "CurrentDirectory" -print | grep -i hello.go"
result, error := exec.Command("bash", "-c", statement).Output()
This gives me a list containing 2 file paths and I try to turn them into arrays that I can individually address using:
Directory_array := strings.Split(string(result),"\n")
fmt.Println(len(Directory_array) )
The length of the array shows as "3" but the array is empty except for the 0th position.
Independently the code lines work but not together. How can I get the array to fill with individual paths?