code: func (u URL) LocalPath() string {
  	switch {
  	case u.Type == URLTypeLocal:
  		return u.URL.Path
  	case u.Type == URLTypeURL && u.URL.Scheme == "file" && u.URL.Opaque == "":
  		if runtime.GOOS == "windows" && len(u.URL.Path) > 0 && u.URL.Path[0] == '/' {
  			return filepath.FromSlash(u.URL.Path[1:])
  		}
  		return filepath.FromSlash(u.URL.Path)
  	}
  	panic("LocalPath called on non-local URL")
  }
docs: // LocalPath returns the path to a local repository in OS-native format.  It is
  // assumed that IsLocal() is true