Skip to content

Commit

Permalink
update coding guideline
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindiu committed Sep 17, 2020
1 parent 28d24ce commit 83fe277
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/contributing/coding-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,9 @@ func New(opts ...Option) (Server, error) {
for _, opt := range opts {
if err := opt(srv); err != nil {
werr := errors.ErrOptionFailed(err, reflect.ValueOf(opt))
if errors.IsCriticalOptionError(err) {
e := new(errors.ErrCriticalOption)
if errors.As(err, &e) {
log.Error(werr)
return nil, werr
}
Expand Down

0 comments on commit 83fe277

Please sign in to comment.