code: func PackageName(path string) (string, error) {
  	fset := token.NewFileSet()
  	pkgs, err := parser.ParseDir(fset, path, nil, parser.PackageClauseOnly)
  	if err != nil {
  		return "", err
  	}
  	var pkgNames []string
  	for n := range pkgs {
  		if !strings.HasSuffix(n, "_test") {
  			pkgNames = append(pkgNames, n)
  		}
  	}
  	if len(pkgNames) > 1 {
  		return "", fmt.Errorf("more than one Go package found in %s (%s)",
  			path, strings.Join(pkgNames, ","))
  	}
  	if len(pkgNames) == 0 {
  		return "", fmt.Errorf("no Go package found in %s", path)
  	}
  	return pkgNames[0], nil
  }
docs: // PackageName returns the name of a package at the given path