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 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const TruncationMarker = "... (truncated)"

TruncationMarker is appended to messages shortened by TruncateMessage so that readers can tell the message is incomplete.

Variables

This section is empty.

Functions

func IsInvalidData

func IsInvalidData(err error) bool

func NewInvalidData

func NewInvalidData(str string, obj ...any) error

func TruncateMessage added in v1.21.2

func TruncateMessage(s string, maxLen int) string

TruncateMessage bounds s to maxLen bytes in total, including the marker which is appended so that readers can tell the message is incomplete.

Types

This section is empty.

Jump to

Keyboard shortcuts

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