code: func ComputeGoLocations(infos map[string]*FileInfo) {
  	for _, info := range infos {
  		dir := filepath.Dir(info.Name)
  		pkg := info.GoPackage
  		// The presence of a slash implies there's an import path.
  		slash := strings.LastIndex(pkg, "/")
  		if slash > 0 {
  			if strings.Contains(pkg, ";") {
  				info.ComputedPackage = pkg
  				continue
  			}
  			decl := pkg[slash+1:]
  			info.ComputedPackage = pkg + ";" + decl
  			continue
  		}
  		if pkg == "" {
  			pkg = info.Package
  		}
  		if pkg == "" {
  			pkg = baseName(info.Name)
  			fmt.Fprintf(os.Stderr, "Warning: file %q has no go_package and no package.\n", info.Name)
  		}
  		info.ComputedPackage = dir + ";" + strings.Map(badToUnderscore, pkg)
  	}
  }
docs: // ComputeGoLocations uses the package and go_package information to
  // figure out the effective Go location and package.  It sets
  // ComputedPackage to the full form "path;decl" (whether decl is
  // redundant or not) as described in
  // github.com/golang/protobuf/issues/139