EncodeMust is a test helper that encodes a cursor or fails the test.
(t *testing.T, secret string, payload any)
| 146 | |
| 147 | // EncodeMust is a test helper that encodes a cursor or fails the test. |
| 148 | func EncodeMust(t *testing.T, secret string, payload any) string { |
| 149 | t.Helper() |
| 150 | s, err := EncodeCursor(secret, payload) |
| 151 | if err != nil { |
| 152 | t.Fatalf("encode: %v", err) |
| 153 | } |
| 154 | return s |
| 155 | } |
no test coverage detected