Skip to content

Commit

Permalink
Use errors.Is
Browse files Browse the repository at this point in the history
  • Loading branch information
lixmal committed Oct 2, 2023
1 parent 944dd62 commit e03dcdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/gdprshare/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"errors"
"flag"
"fmt"
"log"
Expand Down Expand Up @@ -79,7 +80,7 @@ func main() {

go func() {
err := srv.Start()
if err != nil && err != http.ErrServerClosed {
if err != nil && !errors.Is(err, http.ErrServerClosed) {
log.Fatalf("Failed to start server: %s\n", err)
}
}()
Expand Down

0 comments on commit e03dcdd

Please sign in to comment.