diff --git a/document.go b/document.go index 44f5aef..35b0e73 100644 --- a/document.go +++ b/document.go @@ -7,3 +7,8 @@ type Document struct { func (d Document) Key() []byte { return []byte(d.ID) } + +func (d Document) WithId(id string) Document { + d.ID = id + return d +}