cmd

package
v0.17.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 6 Imported by: 10

Documentation

Index

Constants

View Source
const (
	EnvDeprecationMode     = "CNB_DEPRECATION_MODE"
	DefaultDeprecationMode = ModeWarn

	ModeQuiet = "quiet"
	ModeWarn  = "warn"
	ModeError = "error"
)
View Source
const (
	CodeForFailed = 1
	// 2: reserved
	CodeForInvalidArgs = 3

	CodeForIncompatiblePlatformAPI  = 11
	CodeForIncompatibleBuildpackAPI = 12
)

Variables

View Source
var (
	DefaultLogger = log.NewDefaultLogger(Stdout)
	Stdout        = color.NewConsole(os.Stdout)
	Stderr        = color.NewConsole(os.Stderr)
)
View Source
var (
	// Version is the version of the lifecycle and all produced binaries.
	Version = "0.0.0"
	// SCMCommit is the commit information provided by SCM.
	SCMCommit = ""
	// SCMRepository is the source repository.
	SCMRepository = ""
)

The following variables are injected at compile time.

Functions

func DisableColor added in v0.9.2

func DisableColor(noColor bool)

func EnvOrDefault added in v0.9.0

func EnvOrDefault(key string, defaultVal string) string

func Exit

func Exit(err error)

func ExitWithVersion

func ExitWithVersion()

func VerifyBuildpackAPI added in v0.9.0

func VerifyBuildpackAPI(kind, name, requested string, logger log.Logger) error

func VerifyPlatformAPI added in v0.9.0

func VerifyPlatformAPI(requested string, logger log.Logger) error

Types

type BuildpackAPIVerifier added in v0.15.0

type BuildpackAPIVerifier struct{}

func (*BuildpackAPIVerifier) VerifyBuildpackAPI added in v0.15.0

func (v *BuildpackAPIVerifier) VerifyBuildpackAPI(kind, name, requested string, logger log.Logger) error

type ErrorFail

type ErrorFail struct {
	Err    error
	Code   int
	Action []string
}

func FailCode

func FailCode(code int, action ...string) *ErrorFail

func FailErr

func FailErr(err error, action ...string) *ErrorFail

func FailErrCode

func FailErrCode(err error, code int, action ...string) *ErrorFail

func (*ErrorFail) Error

func (e *ErrorFail) Error() string

Directories

Path Synopsis
cli
cli

Jump to

Keyboard shortcuts

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