From 4b93e7ecf950848cc61e7b00d7613ed6f89c9b5a Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Mon, 18 Jul 2022 19:44:50 -0700 Subject: [PATCH] improved documentation --- invalidutf8.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/invalidutf8.go b/invalidutf8.go index 61fcc27..b365a22 100644 --- a/invalidutf8.go +++ b/invalidutf8.go @@ -1,5 +1,21 @@ package utf8 +// InvalidUTF8Complainer is a type of error that could be returned +// by the utf8.ReadRune() function, +// by the utf8.RuneReader.ReadRune() method, and +// by the utf8.RuneScanner.ReadRune() method. +// +// Here is how one might use this type: +// +// r, n, err := utf8.ReadRune(reader) +// if nil != err { +// switch { +// case utf8.InvalidUTF8Complainer: +// //@TODO +// default: +// //@TODO +// } +// } type InvalidUTF8Complainer interface { error InvalidUTF8Complainer()