move shared utility functions into utils
parent
694a246957
commit
a7c8ff26ca
@ -0,0 +1,18 @@
|
||||
package dbi
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
const TMFormat = "2006-01-02 15:04:05"
|
||||
|
||||
func GetNow() string {
|
||||
return time.Now().Format(TMFormat)
|
||||
}
|
||||
|
||||
func GenUUID() string {
|
||||
return strings.ReplaceAll(uuid.New().String(), "-", "")
|
||||
}
|
||||
Loading…
Reference in New Issue