fingerprint_debug.go 303 B

12345678910111213141516171819
  1. //go:build debug
  2. // +build debug
  3. package stun
  4. import "fmt"
  5. // CRCMismatch represents CRC check error.
  6. type CRCMismatch struct {
  7. Expected uint32
  8. Actual uint32
  9. }
  10. func (m CRCMismatch) Error() string {
  11. return fmt.Sprintf("CRC mismatch: %x (expected) != %x (actual)",
  12. m.Expected,
  13. m.Actual,
  14. )
  15. }