checking in some WIP
* added some netx funcs * added netx/dnsx * currently updating docs and adding *x funcs to sprigx
This commit is contained in:
18
stringsx/func_asciiinvaliderror.go
Normal file
18
stringsx/func_asciiinvaliderror.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package stringsx
|
||||
|
||||
import (
|
||||
`fmt`
|
||||
)
|
||||
|
||||
// Error conforms an [AsciiInvalidError] to an error interface.
|
||||
func (a *AsciiInvalidError) Error() (errStr string) {
|
||||
|
||||
errStr = fmt.Sprintf(
|
||||
"non-ASCII character '%c' at line:linepos %d:%d (byte %d), "+
|
||||
"string position %d (byte %d): bytes %#x, UTF-8 codepoint U+%04X",
|
||||
a.BadChar, a.Line, a.LineChar, a.LineByte,
|
||||
a.Char, a.Byte, a.BadBytes, a.BadChar,
|
||||
)
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user