func directoryPaths(modulePath string, packages []*internal.LegacyPackage) []string {
	shouldContinue := func(p string) bool {
		if modulePath == stdlib.ModulePath {
			return p != "."
		}
		return len(p) > len(modulePath)
	}

	pathSet := map[string]bool{modulePath: true}
	for _, p := range packages {
		for p := p.Path; shouldContinue(p); p = path.Dir(p) {
			pathSet[p] = true
		}
	}

	var dirPaths []string
	for d := range pathSet {
		dirPaths = append(dirPaths, d)
	}
	return dirPaths
}
// directoryPaths returns the directory paths in a module.
directoryPaths returns the directory paths in a module.
// directoryPaths returns the directory paths in a module .
func directoryPaths(modulePath string, packages []*internal.LegacyPackage) []string {
	shouldContinue := func(p string) bool {
		if modulePath == stdlib.ModulePath {
			return p != "."
		}
		return len(p) > len(modulePath)
	}
	pathSet := map[string]bool{modulePath: true}
	for _, p := range packages {
		for p := p.Path; shouldContinue(p); p = path.Dir(p) {
			pathSet[p] = true
		}
	}
	var dirPaths []string
	for d := range pathSet {
		dirPaths = append(dirPaths, d)
	}
	return dirPaths
}
func directoryPaths ( modulePath string , packages [ ] * internal . LegacyPackage ) [ ] string { shouldContinue := func ( p string ) bool { if modulePath == stdlib . ModulePath { return p != " " } return len ( p ) > len ( modulePath ) } pathSet := map [ string ] bool { modulePath : true } for _ , p := range packages { for p := p . Path ; shouldContinue ( p ) ; p = path . Dir ( p ) { pathSet [ p ] = true } } var dirPaths [ ] string for d := range pathSet { dirPaths = append ( dirPaths , d ) } return dirPaths }
directoryPaths returns the directory paths in a module.
directoryPaths returns the directory paths in a module .