forked from varia/go-sh-manymanuals
26 lines
303 B
Go
26 lines
303 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"io/ioutil"
|
|
"log"
|
|
"path/filepath"
|
|
)
|
|
|
|
func main() {
|
|
fpath, err := filepath.Abs("./files")
|
|
if err != nil {
|
|
log.Fatalln(err)
|
|
}
|
|
|
|
files, err := ioutil.ReadDir(fpath)
|
|
if err != nil {
|
|
log.Fatalln(err)
|
|
}
|
|
|
|
for _, file := range files {
|
|
fmt.Println(file.Name())
|
|
}
|
|
|
|
}
|