MustBeDString attempts to retrieve a DString from an Expr, panicking if the assertion fails.
(e Expr)
| 1218 | // MustBeDString attempts to retrieve a DString from an Expr, panicking if the |
| 1219 | // assertion fails. |
| 1220 | func MustBeDString(e Expr) DString { |
| 1221 | i, ok := AsDString(e) |
| 1222 | if !ok { |
| 1223 | panic(errors.AssertionFailedf("expected *DString, found %T", e)) |
| 1224 | } |
| 1225 | return i |
| 1226 | } |
| 1227 | |
| 1228 | // MustBeDStringOrDNull attempts to retrieve a DString or DNull from an Expr, panicking if the |
| 1229 | // assertion fails. |
no test coverage detected
searching dependent graphs…