ADDED:
* mapsx.(ListSortedKeys|ListSortedValues|SortedKeys|SortedValues)
This commit is contained in:
brent saner committed 2026-10-10 01:32:35 -04:00
1 parent 67a5c8a3fb
commit 7ec35990a9
16 files changed
+960 -15

No files matched your search

@@ -0,0 +1,26 @@
package binarystr
import "fmt"
// BytePos returns the byte position index immediately leading up to the error.
func (b *BadBinCharErr) BytePos() (pos uint64) { return b.posByte }
// Rune returns the offending rune that caused the error.
func (b *BadBinCharErr) Rune() (r rune) { return b.r }
// RunePos returns the rune (character) position index immediately leading up to the error.
func (b *BadBinCharErr) RunePos() (pos uint64) { return b.posRune }
// Error returns the error message for a BadBinCharError. It conforms to an [error] interface.
func (b *BadBinCharErr) Error() (err string) {
err = fmt.Sprintf(
"rune/character after position index #%d (%#v) (byte #%d) is not \"0\" or \"1\"",
b.posRune, b.r, b.posByte,
)
return
}
// String is an alias for the [BadBinCharErr.Error] method to conform explicitly to a [fmt.Stringer] interface.
func (b *BadBinCharErr) String() (s string) { return b.Error() }