MCPcopy
hub / github.com/crowdsecurity/crowdsec / SaveX

Method SaveX

pkg/database/ent/machine_create.go:1158–1164  ·  view source on GitHub ↗

SaveX is like Save, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

1156
1157// SaveX is like Save, but panics if an error occurs.
1158func (_c *MachineCreateBulk) SaveX(ctx context.Context) []*Machine {
1159 v, err := _c.Save(ctx)
1160 if err != nil {
1161 panic(err)
1162 }
1163 return v
1164}
1165
1166// Exec executes the query.
1167func (_c *MachineCreateBulk) Exec(ctx context.Context) error {

Callers

nothing calls this directly

Calls 1

SaveMethod · 0.95

Tested by

no test coverage detected