The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
douglarek

Go errors 堆栈

  •  
  •   douglarek ·
    douglarek · Apr 12, 2018 · 2191 views
    This topic created in 3134 days ago, the information mentioned may be changed or developed.
    3 replies  •  2018-04-16 17:21:11 +08:00
    douglarek
    douglarek
    OP
    Apr 12, 2018
    1
    国际惯例,自沙
    suyuanhxx
    suyuanhxx
    Apr 12, 2018
    2
    描述太少了
    freestyle
    freestyle
    Apr 16, 2018
    3
    我也和楼主一样在这方面深入思考过, pkg/errors 每次 wrap 都会调用 runtime.Callers, 消耗较大, 其实可以在最底层抛 error 的时候就拿到所有的调用栈信息, 这样只调用一次 runtime.Callers 就可以了的 https://github.com/hanjm/errors
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4388 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 06:53 · PVG 14:53 · LAX 22:53 · JFK 01:53
    ♥ Do have faith in what you're doing.