Skip to content

Commit

Permalink
remove linting from unused patch related functions
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Sep 8, 2022
1 parent 1a94b3b commit 732e196
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions db/collection_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func (c *collection) updateWithFilter(
return results, nil
}

func (c *collection) applyPatch(
func (c *collection) applyPatch( //nolint:unused
txn datastore.Txn,
doc map[string]interface{},
patch []*fastjson.Value,
Expand Down Expand Up @@ -325,7 +325,7 @@ func (c *collection) applyPatch(
return nil
}

func (c *collection) applyPatchOp(
func (c *collection) applyPatchOp( //nolint:unused
txn datastore.Txn,
dockey string,
field string,
Expand Down Expand Up @@ -661,7 +661,7 @@ func (c *collection) createMapping() *core.DocumentMapping {
// May need to query the database for other schema types
// which requires a db transaction. It is recommended
// to use collection.WithTxn(txn) for this function call.
func (c *collection) getCollectionForPatchOpPath(
func (c *collection) getCollectionForPatchOpPath( //nolint:unused
txn datastore.Txn,
path string,
) (col *collection, isArray bool, err error) {
Expand All @@ -670,7 +670,7 @@ func (c *collection) getCollectionForPatchOpPath(

// getTargetKeyForPatchPath walks through the given doc and Patch path.
// It returns the
func (c *collection) getTargetKeyForPatchPath(
func (c *collection) getTargetKeyForPatchPath( //nolint:unused
txn datastore.Txn,
doc map[string]interface{},
path string,
Expand All @@ -683,13 +683,13 @@ func (c *collection) getTargetKeyForPatchPath(
return "", nil
}

func splitPatchPath(path string) ([]string, int) {
func splitPatchPath(path string) ([]string, int) { //nolint:unused
path = strings.TrimPrefix(path, "/")
pathParts := strings.Split(path, "/")
return pathParts, len(pathParts)
}

func getValFromDocForPatchPath(
func getValFromDocForPatchPath( //nolint:unused
doc map[string]interface{},
path string,
) (string, interface{}, bool) {
Expand All @@ -700,7 +700,7 @@ func getValFromDocForPatchPath(
return getMapProp(doc, pathParts, length)
}

func getMapProp(
func getMapProp( //nolint:unused
doc map[string]interface{},
paths []string,
length int,
Expand Down

0 comments on commit 732e196

Please sign in to comment.