build: move to any from interface{}

This commit is contained in:
Mike Berezin
2023-07-09 22:33:45 +05:00
parent 1cd5fe48d6
commit 9d13c602a1
8 changed files with 33 additions and 33 deletions

View File

@@ -16,7 +16,7 @@ const (
var ErrNotDateTime = errors.New("field is not date time")
func ToDateTime(field interface{}) (time.Time, error) {
func ToDateTime(field any) (time.Time, error) {
fS, err := field.(string)
if !err {
return time.Time{}, ErrNotDateTime
@@ -24,6 +24,6 @@ func ToDateTime(field interface{}) (time.Time, error) {
return time.Parse(dateTimeFormat, fS)
}
func FromDateTime(t time.Time) interface{} {
func FromDateTime(t time.Time) any {
return t.Format(dateTimeFormat)
}