func moonWalk(path string, info os.FileInfo, walkFn WalkFunc) error {
	for path != string(os.PathSeparator) {
		if path == "." || path == "" {
			return nil
		}
		names, err := ioutil.ReadDir(path)
		if err != nil {
			return err
		}
		for _, name := range names {
			filename := filepath.Join(path, name.Name())
			fileInfo, err := lstat(filename)
			if !fileInfo.IsDir() {
				walkFn(filename, fileInfo, err)
			}
		}
		path = filepath.Dir(path)
	}
	return nil
}
moonWalk parses the path and moves back towards the root directory.
package moonwalk
import (
	"io/ioutil"
	"os"
	"path/filepath"
)
type WalkFunc func(path string, info os.FileInfo, err error) error
var lstat = os.Lstat