modcache

package
v0.0.165 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 17 Imported by: 0

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