dependencies

package
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageName

type PackageName struct {
	Name           string
	DependentCount int
}

func GetDependenciesBySortedDependentCnt

func GetDependenciesBySortedDependentCnt(ctx context.Context, gqlClient graphql.Client) ([]PackageName, error)

GetDependenciesBySortedDependentCnt retrieves all dependents for each package and returns a sorted list of PackageName, where each PackageName contains the name of the package and the number of its dependents. The list is sorted in descending order based on the DependentCount, so packages with the most dependents come first. This function leverages the findDependentsOfDependencies function to construct a map of all packages and their dependents, then processes this map to create a slice of PackageName, which is then sorted.

Returns: - A slice of PackageName, sorted by DependentCount in descending order. - An error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL