code: func symwalk(path string, info os.FileInfo, walkFn filepath.WalkFunc) error {
  	// Recursively walk symlinked directories.
  	if IsSymlink(info) {
  		resolved, err := filepath.EvalSymlinks(path)
  		if err != nil {
  			return fmt.Errorf("error evaluating symlink %s: %s", path, err)
  		}
  		if info, err = os.Lstat(resolved); err != nil {
  			return err
  		}
  		if err := symwalk(resolved, info, walkFn); err != nil && err != filepath.SkipDir {
  			return err
  		}
  	}
  
  	if err := walkFn(path, info, nil); err != nil {
  		return err
  	}
  
  	if !info.IsDir() {
  		return nil
  	}
  
  	names, err := readDirNames(path)
  	if err != nil {
  		return walkFn(path, info, err)
  	}
  
  	for _, name := range names {
  		filename := filepath.Join(path, name)
  		fileInfo, err := os.Lstat(filename)
  		if err != nil {
  			if err := walkFn(filename, fileInfo, err); err != nil && err != filepath.SkipDir {
  				return err
  			}
  		} else {
  			err = symwalk(filename, fileInfo, walkFn)
  			if err != nil {
  				if (!fileInfo.IsDir() && !IsSymlink(fileInfo)) || err != filepath.SkipDir {
  					return err
  				}
  			}
  		}
  	}
  	return nil
  }
docs: // symwalk recursively descends path, calling walkFn.