version_checkformat.go 431 B

1234567891011121314151617
  1. // Copyright (c) Tailscale Inc & contributors
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. //go:build tailscale_go && android
  4. package version
  5. import "fmt"
  6. func init() {
  7. // For official Android builds using the tailscale_go toolchain,
  8. // panic if the builder is screwed up and we fail to stamp a valid
  9. // version string.
  10. if !isValidLongWithTwoRepos(Long()) {
  11. panic(fmt.Sprintf("malformed version.Long value %q", Long()))
  12. }
  13. }