discopingpurpose_string.go 842 B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) Tailscale Inc & AUTHORS
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. // Code generated by "stringer -type=discoPingPurpose -trimprefix=ping"; DO NOT EDIT.
  4. package magicsock
  5. import "strconv"
  6. func _() {
  7. // An "invalid array index" compiler error signifies that the constant values have changed.
  8. // Re-run the stringer command to generate them again.
  9. var x [1]struct{}
  10. _ = x[pingDiscovery-0]
  11. _ = x[pingHeartbeat-1]
  12. _ = x[pingCLI-2]
  13. }
  14. const _discoPingPurpose_name = "DiscoveryHeartbeatCLI"
  15. var _discoPingPurpose_index = [...]uint8{0, 9, 18, 21}
  16. func (i discoPingPurpose) String() string {
  17. if i < 0 || i >= discoPingPurpose(len(_discoPingPurpose_index)-1) {
  18. return "discoPingPurpose(" + strconv.FormatInt(int64(i), 10) + ")"
  19. }
  20. return _discoPingPurpose_name[_discoPingPurpose_index[i]:_discoPingPurpose_index[i+1]]
  21. }