SHARE
TWEET

Untitled

a guest Oct 22nd, 2019 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func GetDirs(filepath string) []string {
  2.     fileInfos, err := ioutil.ReadDir(filepath)
  3.     if err != nil {
  4.         log.Fatal(err)
  5.     }
  6.  
  7.     res := []string{}
  8.     for _, fi := range fileInfos {
  9.         if !fi.IsDir() {
  10.             continue
  11.         }
  12.         res = append(res, filepath+"/"+fi.Name())
  13.     }
  14.     return res
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top