Skip to content

Instantly share code, notes, and snippets.

@tenntenn
Created February 17, 2016 13:22
Show Gist options
  • Save tenntenn/f1e23f815ad954095273 to your computer and use it in GitHub Desktop.
Save tenntenn/f1e23f815ad954095273 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"os"
"path/filepath"
)
func main() {
filepath.Walk(os.Args[1],
func(path string,
info os.FileInfo,
err error) error {
if err == nil && !info.IsDir() && info.Size() == 0 {
fmt.Println(path)
}
return err
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment