MCPcopy Create free account
hub / github.com/dagger/dagger / WithChangeset

Method WithChangeset

sdk/python/runtime/internal/dagger/dagger.gen.go:1296–1310  ·  view source on GitHub ↗

Add changes to an existing changeset By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument

(changes *Changeset, opts ...ChangesetWithChangesetOpts)

Source from the content-addressed store, hash-verified

1294//
1295// By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument
1296func (r *Changeset) WithChangeset(changes *Changeset, opts ...ChangesetWithChangesetOpts) *Changeset {
1297 assertNotNil("changes", changes)
1298 q := r.query.Select("withChangeset")
1299 for i := len(opts) - 1; i >= 0; i-- {
1300 // `onConflict` optional argument
1301 if !querybuilder.IsZeroValue(opts[i].OnConflict) {
1302 q = q.Arg("onConflict", opts[i].OnConflict)
1303 }
1304 }
1305 q = q.Arg("changes", changes)
1306
1307 return &Changeset{
1308 query: q,
1309 }
1310}
1311
1312// ChangesetWithChangesetsOpts contains options for Changeset.WithChangesets
1313type ChangesetWithChangesetsOpts struct {

Callers

nothing calls this directly

Calls 3

assertNotNilFunction · 0.70
SelectMethod · 0.65
ArgMethod · 0.45

Tested by

no test coverage detected