Skip to content
Snippets Groups Projects
Commit 93bf3aa2 authored by Francé Wilke's avatar Francé Wilke
Browse files

Merge branch 'rename-temporary-variable' into 'main'

Rename temporary error variable to prevent weirdness

See merge request uafrica/go-utils!25
parents a4db9465 1dcb53cf
No related branches found
No related tags found
1 merge request!25Rename temporary error variable to prevent weirdness
...@@ -146,7 +146,7 @@ func GetAllChanges(original interface{}, new interface{}) (map[string]interface{ ...@@ -146,7 +146,7 @@ func GetAllChanges(original interface{}, new interface{}) (map[string]interface{
// If this "key" is integer-like, we handle it a little differently to ensure related data ends up // If this "key" is integer-like, we handle it a little differently to ensure related data ends up
// together and formatted as you would expect JSON arrays to look // together and formatted as you would expect JSON arrays to look
if _, err = strconv.Atoi(change.Path[pathIndex]); err == nil { if _, convErr := strconv.Atoi(change.Path[pathIndex]); convErr == nil {
positionOfSubArray := "" positionOfSubArray := ""
for sub := 0; sub <= pathIndex; sub++ { for sub := 0; sub <= pathIndex; sub++ {
positionOfSubArray = positionOfSubArray + change.Path[sub] positionOfSubArray = positionOfSubArray + change.Path[sub]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment