What's wrong with the writing of beego model?

clipboard.png

clipboard.png

Apr.01,2022

err in line 316 does not exist in scope.
golang has block-level scope. You need to define err outside the if/else above line 316

var err error
if wid == 100017927 {
    _, err = xxx
} else {
    _, err = xxx
}
if err == nil {
}
Menu