StringX is like String, but panics if an error occurs.
(ctx context.Context)
| 378 | |
| 379 | // StringX is like String, but panics if an error occurs. |
| 380 | func (s *selector) StringX(ctx context.Context) string { |
| 381 | v, err := s.String(ctx) |
| 382 | if err != nil { |
| 383 | panic(err) |
| 384 | } |
| 385 | return v |
| 386 | } |
| 387 | |
| 388 | // Ints returns list of ints from a selector. It is only allowed when selecting one field. |
| 389 | func (s *selector) Ints(ctx context.Context) ([]int, error) { |