fmt: rewrite if-else-if-else chain to switch statement
fmt: rewrite if-else-if-else chain to switch statement

This commit rewrites if-else-if-else chain in scanBasePrefix function as a switch.

Based on Go style guide https://golang.org/doc/effective_go.html#switch

Change-Id: I6392bfd4ad0384f3dc8896de4763bb2164c3eead
GitHub-Last-Rev: 9bd8dfdac03c466bf8cacf3119f6245dfb61c009
GitHub-Pull-Request: golang/go#30621
Reviewed-on: https://go-review.googlesource.com/c/go/+/165619
Run-TryBot: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>

CAFxX/go,josharian/go,cloudflare/go,nawawi/go,akutz/go,nawawi/go,akutz/go,nawawi/go,josharian/go,golang/go,CAFxX/go,golang/go,nawawi/go,cloudflare/go,josharian/go,golang/go,golang/go,josharian/go,CAFxX/go,CAFxX/go,CAFxX/go,CAFxX/go,golang/go,cloudflare/go,akutz/go,golang/go,josharian/go,nawawi/go,nawawi/go,nawawi/go,akutz/go,golang/go,josharian/go,cloudflare/go,CAFxX/go,nawawi/go,golang/go,cloudflare/go,cloudflare/go,cloudflare/go,akutz/go,CAFxX/go,akutz/go,josharian/go,cloudflare/go,akutz/go,josharian/go,akutz/go