Fixing linter issues

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
This commit is contained in:
Ryan Lettieri 2022-09-14 15:58:57 -06:00
parent 8a9b4b4986
commit 5d112f4d33
1 changed files with 2 additions and 1 deletions

View File

@ -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]