Wrapping more than one static error to use with errors.Is

后端 未结 0 664
迷失自我
迷失自我 2021-01-15 08:59

Go 1.13 introduced the errors.Is function to check if an error contains a target error in its chain:

err := fmt.Errorf("access denied: %w", ErrPermi         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题