package main
import (
"fmt"
"io/ioutil"
)
func main() {
files, err := ioutil.ReadDir("myfolder")
if err != nil {
fmt.Println(err)
}
for _, file := range files {
fmt.Println(file.Name())
}
}
package main
import (
"fmt"
"io/ioutil"
)
func main() {
files, err := ioutil.ReadDir("myfolder")
if err != nil {
fmt.Println(err)
}
for _, file := range files {
fmt.Println(file.Name())
}
}