pkg: fix godoc mistakes across several packages
Fix doc comments that were copied from Go's standard library
without adjusting for CUE's function names, parameter names,
and return types.
Along the way, we also fix a few typos and other human errors.
Changes in pkg/regexp:
- Find: "returns a list" to "returns a string", "in b" to "in s"
- FindAllNamedSubmatch: typo "the named used" to "the names used"
- FindNamedSubmatch: example output showed a list, but it returns a map
- FindSubmatch: "a list of lists" to "a list", "in b" to "in s"
- ReplaceAll: "empty slice" to "empty string"
Changes in pkg/strings:
- Package doc: remove stuttered "strings.package strings."
- ByteAt: "underlying strings or byte" to "underlying byte slice"
- ByteSlice: "underlying string data" to "underlying byte slice"
- MinRunes: "except all strings" to "accept all strings"
- MaxRunes: same "except" to "accept" typo, plus add missing period
Changes in pkg/list:
- IsSortedStrings: "a sorted lists" to "a sorted list"
Changes in pkg/html:
- Escape: "UnescapeString" to "Unescape"
- Unescape: "EscapeString" to "Escape"
Changes in pkg/net:
- ParseIP: "returns nil" to "returns an error"
Changes in pkg/encoding/hex:
- Decode: parameter name "src" to "s"
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I6d00d4e0ea475bd64ae5cd358b33269a14dffd03
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1233353
Reviewed-by: Matthew Sackman <matthew@cue.works>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>