Help us shape the future of Go! Take the 2026 Go Developer Survey

errors

package
v1.21.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package errors contains reusable error-related code for the storage layer.

Index

Constants

View Source
const (
	ArrayIndexTypeMsg      = "array index must be integer"
	DoesNotExistMsg        = "document does not exist"
	OutOfRangeMsg          = "array index out of range"
	RootMustBeObjectMsg    = "root must be object"
	RootCannotBeRemovedMsg = "root cannot be removed"
)

Variables

View Source
var (
	NotFoundErr            = &storage.Error{Code: storage.NotFoundErr, Message: DoesNotExistMsg}
	RootMustBeObjectErr    = &storage.Error{Code: storage.InvalidPatchErr, Message: RootMustBeObjectMsg}
	RootCannotBeRemovedErr = &storage.Error{Code: storage.InvalidPatchErr, Message: RootCannotBeRemovedMsg}
)

Functions

func NewInvalidPatchError added in v1.10.0

func NewInvalidPatchError(f string, a ...any) *storage.Error

func NewNotFoundErrorWithHint

func NewNotFoundErrorWithHint(path storage.Path, hint string) *storage.Error

func NewNotFoundErrorf

func NewNotFoundErrorf(f string, a ...any) *storage.Error

func NewWriteConflictError

func NewWriteConflictError(p storage.Path) *storage.Error

Types

This section is empty.

Jump to

Keyboard shortcuts

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