modcache

package
v0.0.178 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 21 Imported by: 1 module, 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

func Handle

func Handle(args []string) error

Handle is production entry: HandleWith(args, HandleOpts{}).

func HandleWith

func HandleWith(args []string, opts HandleOpts) error

HandleWith is the injectable entry used by doctests. args are the argv after "kool go modcache".

Types

type HandleOpts

type HandleOpts struct {
	Stdout io.Writer
	Stderr io.Writer
}

HandleOpts injects writers for tests and production defaults.

type ModuleJSON

type ModuleJSON struct {
	Path      string        `json:"path"`
	Newest    string        `json:"newest"`
	Toolchain bool          `json:"toolchain,omitempty"`
	Versions  []VersionJSON `json:"versions"`
}

type Report

type Report struct {
	ModCache       string           `json:"modCache"`
	TotalBytes     int64            `json:"totalBytes"`
	ExtractedBytes int64            `json:"extractedBytes"`
	DownloadBytes  int64            `json:"downloadBytes"`
	VCSBytes       int64            `json:"vcsBytes"`
	ToolchainBytes int64            `json:"toolchainBytes"`
	ToolchainVers  int              `json:"toolchainVersions"`
	ModulePaths    int              `json:"modulePaths"`
	Versions       int              `json:"versions"`
	MultiVersion   int              `json:"multiVersion"`
	LegacyVersions int              `json:"legacyVersions"`
	LegacyBytes    int64            `json:"legacyBytes"`
	SaveBytes      int64            `json:"saveBytes"`
	ReposScanned   int              `json:"reposScanned,omitempty"`
	GoModules      int              `json:"goModules,omitempty"`
	Modules        []ModuleJSON     `json:"modules"`
	Suggestions    []SuggestionJSON `json:"suggestions"`
	// contains filtered or unexported fields
}

type SuggestionJSON

type SuggestionJSON struct {
	Path    string   `json:"path"`
	Current string   `json:"current"`
	Newest  string   `json:"newest"`
	Repos   []string `json:"repos"`
}

type VersionJSON

type VersionJSON struct {
	Version        string `json:"version"`
	Legacy         bool   `json:"legacy"`
	ExtractedBytes int64  `json:"extractedBytes"`
	DownloadBytes  int64  `json:"downloadBytes"`
	ExtractedDir   string `json:"extractedDir,omitempty"`
}

Jump to

Keyboard shortcuts

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