I am pretty new it GoLang but I am trying to read file directorys and
assign the directory name to array list.
Exampe I have been working with this
func captureDir() {
files, err := ioutil.ReadDir("./")
if err != nil {
log.Fatal(err)
}
for _, f := range files {
dirlist[f] = f.Name
}
}
Red marks the error I am not understanding go's logic of how this should be
done.
Also here is my array
var dirlist []string
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.