Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

Commit ef02b23

Browse files
committed
support go1.15+
Dependencies of this module no longer support go versions < 1.15 so a recent update caused these tests to fail: https://github.com/googleapis/google-cloud-go#go-versions-supported Update this module to drop support for 1.12-1.14.
1 parent f30413b commit ef02b23

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.github/workflows/go.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
go: [
16-
'1.12',
17-
'1.13',
18-
'1.14',
19-
'1.15'
16+
'1.15',
17+
'1.16',
18+
'1.17',
19+
'1.18'
2020
]
2121

2222
name: unit

example/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ package main
1515

1616
import (
1717
"context"
18+
"errors"
1819
"fmt"
1920
"log"
2021
"math/rand"
@@ -79,7 +80,7 @@ func main() {
7980
Addr: ":" + port,
8081
}
8182
go func() {
82-
if err := srv.ListenAndServe(); err != nil {
83+
if err := srv.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
8384
log.Printf("server error: %s", err)
8485
}
8586
}()

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/google/go-metrics-stackdriver
22

3-
go 1.12
3+
go 1.15
44

55
require (
66
cloud.google.com/go v0.101.1 // indirect

0 commit comments

Comments
 (0)