Go

Go

Made by DeepSource

Off-by-one error CRT-D0015

Bug risk
Major
Autofix

An off-by-one error happens due to incorrectly handled edge-cases. It is recommended to carefully vet the program for off-by-one bugs.

Bad practice

arr[len(arr)]

Recommended

arr[len(array)-1]