From fe04ac41595edd72c03e0628520c7d3a0b14b862 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Tue, 9 Nov 2021 08:20:37 -0800 Subject: [PATCH 1/2] Drop support for Go < 1.12 Go 1.12 is old enough that we don't need to try to support it. The files global_go112 and global_prego112 existed to support different stack depths for the standard library logger, which changed going from Go 1.11 to 1.12. This is no longer something we need to support because per our CI configuration, we only support Go 1.15+. Ref #682 --- global.go | 1 + global_go112.go | 27 --------------------------- global_prego112.go | 27 --------------------------- 3 files changed, 1 insertion(+), 54 deletions(-) delete mode 100644 global_go112.go delete mode 100644 global_prego112.go diff --git a/global.go b/global.go index c1ac0507c..3cb46c9e0 100644 --- a/global.go +++ b/global.go @@ -31,6 +31,7 @@ import ( ) const ( + _stdLogDefaultDepth = 1 _loggerWriterDepth = 2 _programmerErrorTemplate = "You've found a bug in zap! Please file a bug at " + "https://github.com/uber-go/zap/issues/new and reference this error: %v" diff --git a/global_go112.go b/global_go112.go deleted file mode 100644 index fb11f7390..000000000 --- a/global_go112.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// See #682 for more information. -//go:build go1.12 -// +build go1.12 - -package zap - -const _stdLogDefaultDepth = 1 diff --git a/global_prego112.go b/global_prego112.go deleted file mode 100644 index e452fd53b..000000000 --- a/global_prego112.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2019 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// See #682 for more information. -//go:build !go1.12 -// +build !go1.12 - -package zap - -const _stdLogDefaultDepth = 2 From c6029c2fd3455f8086fb57bacff370dc40886896 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Tue, 9 Nov 2021 08:24:13 -0800 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 542d5c085..4da1eb452 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,12 @@ Enhancements: Bugfixes: * [#1011][]: JSON: Fix inaccurate precision when encoding complex64. +Other changes: +* [#1028][]: Drop support for Go < 1.15. + [#1011]: https://github.com/uber-go/zap/pull/1011 [#989]: https://github.com/uber-go/zap/pull/989 +[#1028]: https://github.com/uber-go/zap/pull/1028 ## 1.19.1 (8 Sep 2021)