On 08/31/2017 08:41 PM, djl...@gmail.com wrote:
> 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
> 
> funccaptureDir() {
>    files, err:=ioutil.ReadDir("./")
>    iferr !=nil{
>        log.Fatal(err)
>    }
> 
>     for_, f:=rangefiles {
>        dirlist[f] = f.Name
>    }
> }
> 

Name is a method not a variable so it should be f.Name(). There might be
other issues with that snippet though.

-ayan

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to