encoding/protobuf: cope with major version suffixes in module paths
Currently the protobuf logic for determining if an import is
inside the main module does not work if the module has
a major version suffix. This change makes that work OK.
It's not perfect, because we do not consider the major
version that might be present in the Go import path, but
it's certainly better than before.
Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I36fbc476ecdaff1fce01dd2e5095c77f455bbacf
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194791
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>