Skip to content

Commit 5a66be4

Browse files
committed
codec: helper_unsafe requires go1.21+ (clear, etc) and benchmarks require go1.24+ (b.Loop)
1 parent eb5be03 commit 5a66be4

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

codec/bench_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) 2012-2020 Ugorji Nwoke. All rights reserved.
22
// Use of this source code is governed by a MIT license found in the LICENSE file.
33

4+
//go:build go1.24
5+
46
package codec
57

68
// bench_test is the "helper" file for all benchmarking tests.

codec/codec_bench_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) 2012-2020 Ugorji Nwoke. All rights reserved.
22
// Use of this source code is governed by a MIT license found in the LICENSE file.
33

4+
//go:build go1.24
5+
46
package codec
57

68
import (

codec/helper_unsafe.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
// Copyright (c) 2012-2020 Ugorji Nwoke. All rights reserved.
22
// Use of this source code is governed by a MIT license found in the LICENSE file.
33

4-
//go:build !safe && !codec.safe && !appengine && go1.9
5-
6-
// minimum of go 1.9 is needed, as that is the minimum for all features and linked functions we need
7-
// - typedmemclr was introduced in go 1.8
8-
// - mapassign_fastXXX was introduced in go 1.9
4+
//go:build !safe && !codec.safe && !appengine && go1.21
5+
6+
// minimum of go 1.21 is needed, as that is the minimum for all features and linked functions we need
7+
// - typedmemclr : go1.8
8+
// - mapassign_fastXXX: go1.9
9+
// - clear was added in go1.21
10+
// - unsafe.String(Data): go1.20
11+
// - unsafe.Add: go1.17
12+
// - generics/any: go1.18
913
// etc
1014

1115
package codec

0 commit comments

Comments
 (0)