From 5d112f4d336b9f3ae44da70bd3d8ffcbd97f4834 Mon Sep 17 00:00:00 2001 From: Ryan Lettieri Date: Wed, 14 Sep 2022 15:58:57 -0600 Subject: [PATCH] Fixing linter issues Signed-off-by: Ryan Lettieri --- state/azure/cosmosdb/cosmosdb_query.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/state/azure/cosmosdb/cosmosdb_query.go b/state/azure/cosmosdb/cosmosdb_query.go index d326699e7..284dc08e4 100644 --- a/state/azure/cosmosdb/cosmosdb_query.go +++ b/state/azure/cosmosdb/cosmosdb_query.go @@ -173,6 +173,7 @@ func (q *Query) execute(client *azcosmos.ContainerClient) ([]state.QueryItem, st tempItem := CosmosItem{} err := json.Unmarshal(item, &tempItem) if err != nil { + return nil, "", err } items = append(items, tempItem) } @@ -222,7 +223,7 @@ func replaceKeyword(key, keyword string) string { // Get the new keyword to replace newKeyword := keyword if nextIndx < len(key)-1 { - // Get the index of the next period (Note that it grabs the index relative to the begining of the initial string) + // Get the index of the next period (Note that it grabs the index relative to the beginning of the initial string) idxOfPeriod := strings.Index(key[nextIndx+1:], ".") if idxOfPeriod != -1 { newKeyword = key[nextIndx+1 : nextIndx+idxOfPeriod+1]