gomod

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

THIS FILE IS GENERATED. SEE ./scripts/gen_stdlib_map.sh Generated by: go version go1.18.2 darwin/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListDependencies added in v1.4.0

func ListDependencies(dir, rootModule, rootVersion string, outputOptions output.Options) (dependencies map[string]GoModule, err error)

ListDependencies returns a map from dependency import paths to the imported module's name and version as declared by the go.mod file in the current directory. The given root module and version are used to resolve replace directives with local file paths. The root module is expected to be a resolved import path (a valid URL, including a scheme).

func ListProjectDependencies added in v1.7.0

func ListProjectDependencies(projectRoot string) ([]string, error)

listProjectDependencies finds any packages from "$ go list all" that are NOT declared as part of the current project.

NOTE: This is different from the other dependencies stored in the indexer because it does not modules, but packages.

func ModuleName added in v1.4.0

func ModuleName(dir, repo string, outputOptions output.Options) (moduleName string, isStdLib bool, err error)

ModuleName returns the resolved name of the go module declared in the given directory usable for moniker identifiers. Note that this is distinct from the declared module as this does not uniquely identify a project via its code host coordinates in the presence of forks.

isStdLib is true if dir is pointing to the src directory in the golang/go repository.

func NormalizeMonikerPackage added in v1.6.6

func NormalizeMonikerPackage(path string) string

NormalizeMonikerPackage returns a normalized path to ensure that all standard library paths are handled the same. Primarily to make sure that both the golangRepository and "std/" paths are normalized.

Types

type GoModule added in v1.6.6

type GoModule struct {
	Name    string
	Version string
}

func GetGolangDependency added in v1.6.6

func GetGolangDependency(dependencies map[string]GoModule) GoModule

Jump to

Keyboard shortcuts

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