go/src/mime
Russ Cox 4d8db00641 all: use bytes.Cut, strings.Cut
Many uses of Index/IndexByte/IndexRune/Split/SplitN
can be written more clearly using the new Cut functions.
Do that. Also rewrite to other functions if that's clearer.

For #46336.

Change-Id: I68d024716ace41a57a8bf74455c62279bde0f448
Reviewed-on: https://go-review.googlesource.com/c/go/+/351711
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-10-06 15:53:04 +00:00
..
multipart net/http: ignore directory path when parsing multipart forms 2021-05-05 18:14:49 +00:00
quotedprintable all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
testdata mime: in globs2 file only keep first time extension is seen 2021-04-13 18:08:06 +00:00
encodedword.go all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
encodedword_test.go all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
example_test.go all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
grammar.go
mediatype.go all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
mediatype_test.go
type.go mime: document use of the Shared MIME-Info Database 2021-05-26 22:41:35 +00:00
type_dragonfly.go
type_freebsd.go
type_openbsd.go
type_plan9.go
type_test.go mime: fix ExtensionsByType bug when there are duplicates 2020-02-25 21:09:55 +00:00
type_unix.go mime: in globs2 file only keep first time extension is seen 2021-04-13 18:08:06 +00:00
type_unix_test.go mime: support reading shared mime-info database on unix systems 2021-04-12 21:04:48 +00:00
type_windows.go syscall: remove dependency on io 2020-10-13 00:55:35 +00:00