code: func goLibPackageDir(name, filename string) string {
  	dir := filepath.Join(filepath.Dir(filename), name)
  
  	// escape last dir element
  	elems := strings.Split(dir, "/")
  	elems[len(elems)-1] = commons.NormalizeIdentifier(elems[len(elems)-1])
  	return strings.Join(elems, "/")
  }
docs: // returns Go package directory of a library
  // name is library name. filename is library file name.
  // for the rule, see comment of `type goLibrary struct`