modinfo

package
v31.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateModuleNameFromPath

func CreateModuleNameFromPath(pkgDir string) (string, error)

CreateModuleNameFromPath creates a module name from the provided path.

func FindVersionSuffix

func FindVersionSuffix(path string) string

FindVersionSuffix returns the version suffix or the empty string.

func GetModuleSubdirs

func GetModuleSubdirs(path string) ([]string, error)

GetModuleSubdirs returns all subdirectories under path that correspond to module major versions. The subdirectories are sorted according to semantic version.

func HasVersionSuffix

func HasVersionSuffix(path string) bool

HasVersionSuffix returns true if the specified path has a version suffix in the form vN.

func IncrementModuleVersion

func IncrementModuleVersion(ver string) string

IncrementModuleVersion increments the passed in module major version by one. E.g. a provided value of "v2" will return "v3". If ver is "" the return value is "v2".

Types

type Provider

type Provider interface {
	DestDir() string
	NewExports() bool
	BreakingChanges() bool
	VersionSuffix() bool
	NewModule() bool
	GenerateReport() report.Package
}

Provider provides information about a module staged for release.

func GetModuleInfo

func GetModuleInfo(baseline, staged string) (Provider, error)

GetModuleInfo collects information about a module staged for release. baseline is the directory for the current module staged is the directory for the module staged for release

Jump to

Keyboard shortcuts

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