Support additional unmarshal formats.

- Additional time formats supported
- Support for hex format binary string unmarshal
- Support for base64 format with prefix
- Support for unmarshalling "0" and "1" to boolean value
This commit is contained in:
go-jet 2025-02-22 18:28:25 +01:00
parent c93c9f2888
commit f20bf50879
2 changed files with 70 additions and 11 deletions

View file

@ -14,7 +14,6 @@ import (
"bytes"
"compress/gzip"
"fmt"
"internal/testenv"
"io"
"os"
"reflect"
@ -462,9 +461,9 @@ func BenchmarkUnmapped(b *testing.B) {
func BenchmarkTypeFieldsCache(b *testing.B) {
b.ReportAllocs()
var maxTypes int = 1e6
if testenv.Builder() != "" {
maxTypes = 1e3 // restrict cache sizes on builders
}
//if testenv.Builder() != "" {
// maxTypes = 1e3 // restrict cache sizes on builders
//}
// Dynamically generate many new types.
types := make([]reflect.Type, maxTypes)