I'm trying to come up with a fairly small script to find a directory and 
then list the contents of a given directory name.

The filestructure is thus: 
/root/1/1
/root/1/2
/root/1/BigZoom
/root/1/BigZoom/1
/root/2/1
/root/2/2
/root/2/BigZoom
/root/2/BigZoom/1

I want to find any file in a directory named BigZoom. I'm new to Go, but 
thought I'd give it a go. 

I use filepath.WalkDir in this code https://play.golang.org/p/ivqA7o2nCCs - 
it seems that my problem is passing a fileinfo.Name to ReadDir. What should 
go on line 25 for the ReadDir call? I thought I could pass in a string, but 
I'm getting: 

panic: open BigZoom: no such file or directory

Any help would be much appreciated - thanks in advance. 

Adam

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/9ec35241-8fa6-49bd-ad07-56b57cc8cd3an%40googlegroups.com.

Reply via email to