Go

Go

Made by DeepSource

Poorly chosen name for error variable SCC-ST1012

Style
Minor

The error variable name should be chosen carefully to convey the meaning of the error. It is recommended to use names like errFoo, ErrSomethingBad, ErrKindFoo or BazError for error variables that are part of an API.

Examples:

Bad practice

_, e := ioutil.ReadFile("file.txt")
if e != nil {
    log.Fatal(e)
}

Recommended

_, err := ioutil.ReadFile("file.txt")
if err != nil {
    log.Fatal(err)
}

Reference: Effective Go - Errors