SaveX calls Save and panics if Save returns an error.
(ctx context.Context)
| 169 | |
| 170 | // SaveX calls Save and panics if Save returns an error. |
| 171 | func (tc *TaskCreate) SaveX(ctx context.Context) *Task { |
| 172 | v, err := tc.Save(ctx) |
| 173 | if err != nil { |
| 174 | panic(err) |
| 175 | } |
| 176 | return v |
| 177 | } |
| 178 | |
| 179 | // Exec executes the query. |
| 180 | func (tc *TaskCreate) Exec(ctx context.Context) error { |