// PackageExports trims the AST for a Go package in place such that only
// exported nodes remain. The pkg.Files list is not changed, so that file
// names and top-level package comments don't get lost.
//
// PackageExports returns true if there is an exported declaration; it
// returns false otherwise.
//

PackageExports trims the AST for a Go package in place such that only
exported nodes remain. The pkg.Files list is not changed, so that file
names and top-level package comments don't get lost.

PackageExports returns true if there is an exported declaration; it
returns false otherwise.
// PackageExports trims the AST for a Go package in place such that only // exported nodes remain . The pkg . Files list is not changed so that file // names and top - level package comments don ' t get lost . // // PackageExports returns true if there is an exported declaration ; it // returns false otherwise . //
func PackageExports(pkg *Package) bool {
	hasExports := false
	for _, f := range pkg.Files {
		if FileExports(f) {
			hasExports = true
		}
	}
	return hasExports
}
func PackageExports ( pkg * Package ) bool { hasExports := false for _ , f := range pkg . Files { if FileExports ( f ) { hasExports = true } } return hasExports }
PackageExports trims the AST for a Go package in place such that only
exported nodes remain.
PackageExports trims the AST for a Go package in place such that only exported nodes remain .