common

package
v0.0.0-...-e8ae10b Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package common contains definitions used by all standard hook layers.

Index

Constants

View Source
const (
	// a layer definition contains unknown command
	UnknownCommandError = llx.LayerErrors + iota
	// a layer definition is missing required command
	MissingCommandError
	// a command has too few or too many arguments
	NumberOfArgumentsError
	// a command has incorrect argument
	InvalidArgumentError
	// repeating a command that must not be repeated
	CommandAlreadyUsedError
	// a command argument doesn't match any known token type
	UnknownTokenTypeError
	// incoming token triggered an error
	WrongTokenError
)

Error codes emitted by standard hook layers.

Variables

This section is empty.

Functions

func MakeCommandAlreadyUsedError

func MakeCommandAlreadyUsedError(layer, command string) *llx.Error

func MakeInvalidArgumentError

func MakeInvalidArgumentError(layer, command, arg, reason string) *llx.Error

func MakeMissingCommandError

func MakeMissingCommandError(layer, command string) *llx.Error

func MakeNumberOfArgumentsError

func MakeNumberOfArgumentsError(layer, command string, expected, got int) *llx.Error

func MakeUnknownCommandError

func MakeUnknownCommandError(layer, command string) *llx.Error

func MakeUnknownTokenTypeError

func MakeUnknownTokenTypeError(layer, command, typeName string) *llx.Error

func MakeWrongTokenError

func MakeWrongTokenError(layer string, token *parser.Token, reason string) *llx.Error

Types

This section is empty.

Jump to

Keyboard shortcuts

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