Documentation ¶
Overview ¶
Package xerr is a simplistic (and more efficient) re-write of the "errors" built-in package.
This is used to create comparable and (sometimes) un-wrapable error structs.
This package acts differently when the "implant" build tag is used. If enabled, Most error string values are stripped to prevent identification and debugging.
It is recommended if errors are needed to be compared even when in an implant build, to use the "Sub" function, which will ignore error strings and use error codes instead.
Index ¶
Constants ¶
const ExtendedInfo = true
ExtendedInfo is a compile time constant to help signal if complex string values should be concatinated inline.
This helps prevent debugging when the "-tags implant" option is enabled.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates a new string backed error interface and returns it. This error struct does not support Unwrapping.
The resulting errors created will be comparable.
func Sub ¶ added in v0.2.0
Sub creates a new string backed error interface and returns it. This error struct does not support Unwrapping.
If the "-tags implant" option is selected, the second value, the error code, will be used instead, otherwise it's ignored.
The resulting errors created will be comparable.
Types ¶
This section is empty.