move server/* to scnserver/*
This commit is contained in:
21
scnserver/models/utils.go
Normal file
21
scnserver/models/utils.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"gogs.mikescher.com/BlackForestBytes/goext/langext"
|
||||
"time"
|
||||
)
|
||||
|
||||
func timeOptFmt(t *time.Time, fmt string) *string {
|
||||
if t == nil {
|
||||
return nil
|
||||
} else {
|
||||
return langext.Ptr(t.Format(fmt))
|
||||
}
|
||||
}
|
||||
|
||||
func timeOptFromMilli(millis *int64) *time.Time {
|
||||
if millis == nil {
|
||||
return nil
|
||||
}
|
||||
return langext.Ptr(time.UnixMilli(*millis))
|
||||
}
|
||||
Reference in New Issue
Block a user