Browse Source

update go version

pull/2/head
andrey1s 3 years ago
parent
commit
21c14e24be
  1. 2
      .drone.yml
  2. 2
      go.mod
  3. 3
      go.sum
  4. 10
      logger_example_test.go

2
.drone.yml

@ -3,7 +3,7 @@ name: default
steps:
- name: test
image: golang:1.17.1
image: golang:1.17.6
volumes:
- name: deps
path: /go/src/mod

2
go.mod

@ -8,7 +8,7 @@ require (
go.opentelemetry.io/otel v0.20.0
go.opentelemetry.io/otel/sdk v0.20.0
go.opentelemetry.io/otel/trace v0.20.0
go.uber.org/zap v1.19.1
go.uber.org/zap v1.21.0
)
require (

3
go.sum

@ -36,10 +36,13 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4=
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI=
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=

10
logger_example_test.go

@ -66,7 +66,7 @@ func ExampleNew_jsonFormat() {
log.GoVersion("go-version"),
)
logger.Err(ctx, "same error message")
// Output: {"go-version":"go1.17.1","level":"error","msg":"same error message"}
// Output: {"go-version":"go1.17.6","level":"error","msg":"same error message"}
}
func ExampleNew_textEncoding() {
@ -79,8 +79,8 @@ func ExampleNew_textEncoding() {
logger.InfoKVs(ctx, "same info message", "api-version", 0.1)
// Output:
// msg="same error message" level=error go-version=go1.17.1
// msg="same info message" api-version=0.1 level=info go-version=go1.17.1
// msg="same error message" level=error go-version=go1.17.6
// msg="same info message" api-version=0.1 level=info go-version=go1.17.6
}
type ctxKey string
@ -102,7 +102,7 @@ func ExampleWith() {
levelInfo, log.WithContextValue(requestID), log.KeyValue("api", "0.1.0"), log.GoVersion("go"),
)
logger.Info(vctx, "same message")
// Output: msg="same message" level=info requestID=6a5fa048-7181-11ea-bc55-0242ac130003 api=0.1.0 go=go1.17.1
// Output: msg="same message" level=info requestID=6a5fa048-7181-11ea-bc55-0242ac130003 api=0.1.0 go=go1.17.6
}
func ExampleLogger_Print() {
@ -111,7 +111,7 @@ func ExampleLogger_Print() {
levelInfo, log.KeyValue("client", "http"), log.KeyValue("api", "0.1.0"), log.GoVersion("go"),
)
logger.Print("same message")
// Output: msg="same message" level=info client=http api=0.1.0 go=go1.17.1
// Output: msg="same message" level=info client=http api=0.1.0 go=go1.17.6
}
func ExamplePrint() {

Loading…
Cancel
Save