module: reject "+" in CheckPath and CheckImportPath

"+" was allowed in some vcs regular expressions, but doesn't seem
to be used in practice anymore. Stop accepting it in import paths.
This is being submitted early in the Go 1.16 cycle so that if a
usage is detected it can be reverted. See the discussion in for more details.

For golang/go#31376

Change-Id: I392fcdcf829886bd0a28450ba5e399e64dd01559
Run-TryBot: Michael Matloob <>
TryBot-Result: Gobot Gobot <>
Reviewed-by: Jay Conrod <>
Reviewed-by: Bryan C. Mills <>
2 files changed