diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6594b85..987b2b0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,10 +13,10 @@ jobs: fail-fast: false matrix: go: [ - '1.12', - '1.13', - '1.14', - '1.15' + '1.15', + '1.16', + '1.17', + '1.18' ] name: unit diff --git a/example/main.go b/example/main.go index 361816e..c595a79 100644 --- a/example/main.go +++ b/example/main.go @@ -15,6 +15,7 @@ package main import ( "context" + "errors" "fmt" "log" "math/rand" @@ -79,7 +80,7 @@ func main() { Addr: ":" + port, } go func() { - if err := srv.ListenAndServe(); err != nil { + if err := srv.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) { log.Printf("server error: %s", err) } }() diff --git a/go.mod b/go.mod index afb75ba..5e9fc1b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/google/go-metrics-stackdriver -go 1.12 +go 1.15 require ( cloud.google.com/go v0.101.1 // indirect