graph

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cycle

type Cycle struct {
	// Nodes in the cycle
	Nodes []*Node
}

type Edge

type Edge struct {
	From *Node // never nil.
	To   *Node
	// The version of the dependency
	Version string
}

type Graph

type Graph struct {
	Nodes  map[string]*Node // path -> Node
	Edges  []Edge           // Edges
	Cycles []Cycle          // Cycles as they are discovered
}

type ModuleInfo

type ModuleInfo struct {
	Path               string // Module path from go.mod
	RepoPath           string // Repository path (owner/repo) where it was found
	IsFork             bool
	OriginalModulePath string            // Module path from the parent repo's go.mod (if fork)
	Owner              string            // Owner (org or user) where the module definition was found
	OwnerIdx           int               // Index of the owner in the input list (for coloring)
	Deps               map[string]string // path -> version
	Fetched            bool              // Indicates if the go.mod was successfully fetched and parsed
}

ModuleInfo stores details about modules found in the scanned owners (orgs or users).

type Node

type Node struct {
	Path       string
	Module     *ModuleInfo // nil for (ext) dependencies
	PartOfLoop bool
	SetID      int // 0 for first owner/org, 1 for second, etc. - determines the color (with the fork attribute of the module)
}

Jump to

Keyboard shortcuts

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