v0.0.396 sq.ConverterRFCSecondsF64ToString
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m2s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m2s
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/exerr"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/langext"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/rfctime"
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/timeext"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -114,6 +115,12 @@ var ConverterRFCTimeToString = NewDBTypeConverter[rfctime.Time, string](func(v r
|
||||
return res, nil
|
||||
})
|
||||
|
||||
var ConverterRFCSecondsF64ToString = NewDBTypeConverter[rfctime.SecondsF64, float64](func(v rfctime.SecondsF64) (float64, error) {
|
||||
return v.Seconds(), nil
|
||||
}, func(v float64) (rfctime.SecondsF64, error) {
|
||||
return rfctime.NewSecondsF64(timeext.FromSeconds(v)), nil
|
||||
})
|
||||
|
||||
var ConverterJsonObjToString = NewDBTypeConverter[JsonObj, string](func(v JsonObj) (string, error) {
|
||||
mrsh, err := json.Marshal(v)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user