Make tinygo use MapIter.Key() & MapIter.Value()

tinygo v0.33 doesn't support Value.SetIterKey() and
Value.SetIterValue(), which are in go1.20 and newer.

This commit adds tinygo build tag to use MapIter.Key() and
MapIter.Value() instead to iterate map elements using reflect.
This commit is contained in:
Faye Amacker 2024-09-07 20:24:51 -05:00
parent 456253cc1e
commit 7730daf1b0
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
// Copyright (c) Faye Amacker. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
//go:build go1.20
//go:build go1.20 && !tinygo
package cbor

View File

@ -1,7 +1,7 @@
// Copyright (c) Faye Amacker. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
//go:build !go1.20
//go:build !go1.20 || tinygo
package cbor