discopingpurpose_string.go 914 B

123456789101112131415161718192021222324252627282930
  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. _ = x[pingHeartbeatForUDPLifetime-3]
  14. }
  15. const _discoPingPurpose_name = "DiscoveryHeartbeatCLIHeartbeatForUDPLifetime"
  16. var _discoPingPurpose_index = [...]uint8{0, 9, 18, 21, 44}
  17. func (i discoPingPurpose) String() string {
  18. idx := int(i) - 0
  19. if i < 0 || idx >= len(_discoPingPurpose_index)-1 {
  20. return "discoPingPurpose(" + strconv.FormatInt(int64(i), 10) + ")"
  21. }
  22. return _discoPingPurpose_name[_discoPingPurpose_index[idx]:_discoPingPurpose_index[idx+1]]
  23. }