Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func GetDirs(filepath string) []string {
- fileInfos, err := ioutil.ReadDir(filepath)
- if err != nil {
- log.Fatal(err)
- }
- res := []string{}
- for _, fi := range fileInfos {
- if !fi.IsDir() {
- continue
- }
- res = append(res, filepath+"/"+fi.Name())
- }
- return res
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement