bingo

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvBinVarsName = "variables.env"
)
View Source
const (
	MakefileBinVarsName = "Variables.mk"
)

Variables

This section is empty.

Functions

func EnsureModMeta

func EnsureModMeta(modFile string, pkg string) (err error)

EnsureModMeta comment on given module file to make sure users knows it's autogenerated. It also ensures that sub package path is recorded, which is required for package-level versioning.

func GenHelpers added in v0.2.0

func GenHelpers(relModDir, version string, modFiles ...string) error

GenHelpers generates helpers to allows reliable binaries use. Regenerate if needed. It is expected to have at least one mod file.

func ModDirectPackage

func ModDirectPackage(modFile string, r io.Reader) (pkg string, version string, err error)

ModDirectPackage returns buildable package we encoded in the bingo controlled go module. We encode it as single direct module with end of line comment containing relative package path if any. If r is nil, modFile will be read.

func ModHasMeta

func ModHasMeta(modFile string, r io.Reader) (bool, error)

ModHasMeta returns true if given mod file contains metadata in comments we are adding in `EnsureModMeta`. If r is nil, modFile will be read.

func NameFromModFile

func NameFromModFile(modFile string) (name string, oneOfMany bool)

NameFromModFile returns binary name from module file path.

func RemoveHelpers added in v0.2.0

func RemoveHelpers(modDir string) error

RemoveHelpers deletes helpers from mod directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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