Skip to content

Commit

Permalink
d2ir: Explain EnsureField misnomer
Browse files Browse the repository at this point in the history
  • Loading branch information
nhooyr committed Jul 29, 2023
1 parent 1c8ecd3 commit 4a89e49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions d2ir/d2ir.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ func (m *Map) getField(ida []string) *Field {
return nil
}

// EnsureField is a bit of a misnomer. It's more of a Query/Ensure combination function at this point.
func (m *Map) EnsureField(kp *d2ast.KeyPath, refctx *RefContext, create bool) ([]*Field, error) {
i := 0
for kp.Path[i].Unbox().ScalarString() == "_" {
Expand Down

0 comments on commit 4a89e49

Please sign in to comment.