internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PackageUsages

func PackageUsages(src string) map[string]int

PackageUsages analyzes the given code, records the imported package, and counts the number of times that each imported package is used.

It panics if it encounters a problem. (for better stacktraces heh)

func PackageUsagesForModule

func PackageUsagesForModule(moduleRootPath string) map[string]int

PackageUsagesForModule finds the number of times each of the given module's package dependencies are referred to.

Types

type ASTParser

type ASTParser struct{}

func (*ASTParser) ModuleUsagesForModule

func (*ASTParser) ModuleUsagesForModule(from, to string) int

ModuleUsagesForModule finds the number of times each of the given module's module dependencies are referred to.

This is a thin cache wrapper around the real thing.

type ModuleSizer

type ModuleSizer struct{}

func (*ModuleSizer) ModuleSize

func (ms *ModuleSizer) ModuleSize(module string) (int64, error)

ModuleSize returns the size of the module on the OS. It is non-cumulative.

If the module can not be found, it returns -1,nil.

Other errors are returned as -1,err.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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