diff options
Diffstat (limited to 'misc.go')
-rw-r--r-- | misc.go | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -36,15 +36,6 @@ var ( // generic I/O ///////////////////////////////////////////////////////////////// -func decodeRune[T interface{ []byte | string }](s T) (r rune, size int) { - iface := any(s) - if str, ok := iface.(string); ok { - return utf8.DecodeRuneInString(str) - } else { - return utf8.DecodeRune(iface.([]byte)) - } -} - func writeByte(w io.Writer, c byte) error { if br, ok := w.(interface{ WriteByte(byte) error }); ok { return br.WriteByte(c) |