code: func (p *parser) parsePackage(fileNames []string) error {
  	if len(fileNames) == 0 {
  		return fmt.Errorf("fileNames is empty")
  	}
  	for i, name := range fileNames {
  		if i > 0 && filepath.Dir(name) != filepath.Dir(fileNames[0]) {
  			return fmt.Errorf("Go files belong to different directories")
  		}
  		if !strings.HasSuffix(name, ".go") {
  			continue
  		}
  		file, err := goparser.ParseFile(p.fileSet, name, nil, 0)
  		if err != nil {
  			return fmt.Errorf("parsing %s: %s", name, err)
  		}
  		if len(p.files) > 0 && file.Name.Name != p.files[0].Name.Name {
  			return fmt.Errorf("Go files belong to different packages")
  		}
  		p.files = append(p.files, file)
  	}
  	if len(p.files) == 0 {
  		return fmt.Errorf("no buildable Go files")
  	}
  	return nil
  }
docs: // parsePackage parses .go files and fills in p.files with the ASTs.
  // Files must be in the same directory and have the same package name.