Skip to content

Instantly share code, notes, and snippets.

@MasterGroosha
Created July 25, 2019 16:34
Show Gist options
  • Save MasterGroosha/03f9a2be3e2231a6478d207943d81dcb to your computer and use it in GitHub Desktop.
Save MasterGroosha/03f9a2be3e2231a6478d207943d81dcb to your computer and use it in GitHub Desktop.
Test go files renamer with padding
package main
import (
"fmt"
"os"
"path/filepath"
)
const (
DirPath = "D:\\test"
)
func main() {
var files []string
err := filepath.Walk(DirPath, func(path string, info os.FileInfo, err error) error {
if !info.IsDir() {
files = append(files, path)
}
return nil
})
if err != nil {
panic(err)
}
for _, file := range files {
fmt.Println(file)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment