code: func IsSubpath(path, root string) bool {
  	path, err := filepath.Abs(filepath.Clean(path))
  	if err != nil {
  		return false
  	}
  	root, err = filepath.Abs(filepath.Clean(root))
  	if err != nil {
  		return false
  	}
  	if root == path {
  		return true
  	}
  	if root[len(root)-1] != filepath.Separator {
  		root += string(filepath.Separator)
  	}
  	return strings.HasPrefix(path, root)
  }
docs: // IsSubpath returns true if 'path' is 'root' or is inside a subdirectory of
  // 'root'. Both 'path' and 'root' should be given as a native paths. If any of
  // paths can't be converted to an absolute path returns false.