golang panic: "err is shadowed during return"

func foo() (err error) {

    err = fmt.Errorf("err")
    {
        var err = fmt.Errorf("err")
        _ = err
        return
    }
    return
}


发表于:2016-12-03 17:15:05

原文链接(转载请保留): http://www.multisilicon.com/blog/a36332626.html

友情链接: MICROIC
首页