Skip to content

Commit

Permalink
Rename .Del -> .Delete for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
ConradIrwin committed Jun 11, 2023
1 parent 245dab8 commit 1926a10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion automerge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func TestMap(t *testing.T) {

require.Equal(t, "&automerge.Map{\"string\": \"hello\"}", n.GoString())

require.NoError(t, m.Del("map"))
require.NoError(t, m.Delete("map"))
v, err := m.Get("map")
require.NoError(t, err)
require.True(t, v.IsVoid())
Expand Down
2 changes: 1 addition & 1 deletion map.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (m *Map) Len() int {
}

// Del deletes a key and its corresponding value from the map
func (m *Map) Del(key string) error {
func (m *Map) Delete(key string) error {
if m.doc == nil {
return fmt.Errorf("automerge.Map: tried to write to detached map")
}
Expand Down

0 comments on commit 1926a10

Please sign in to comment.