modutils

package
v0.20.8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ModPackageFileError  = eris.New("could not find mod package file")
	NonGoModPackageError = eris.New("path could not be found, as this function must be run from within a" +
		"go.mod package")

	EmptyFileError = eris.New("empty file supplied, must be")

	UnableToListPackagesError = eris.New("unable to list dependencies for current go.mod packages")
)

Functions

func GetCurrentModPackageFile

func GetCurrentModPackageFile() (string, error)

Returns the current go mod package Ex: /path/to/solo-kit/go.mod

Will return /dev/null on unix if not in a go.mod package

func GetCurrentModPackageName

func GetCurrentModPackageName(module string) (string, error)

Returns the current go mod package name from the go.mod file. Use the function below to get the filename Ex: github.com/solo-io/solo-kit

func GetCurrentPackageList

func GetCurrentPackageList() (*bytes.Buffer, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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