fix: golangci-lint and gosec warnings

This commit is contained in:
2021-05-16 23:02:46 +02:00
parent f7bb283784
commit ffbc8a793c
22 changed files with 228 additions and 157 deletions

View File

@ -1,14 +1,11 @@
package format
import (
"errors"
"math"
"time"
)
var (
errorPraseTime = errors.New("Can not parse time")
TimeFormat = "2006-01-02T15:04:05.999999Z07:00"
)
@ -19,5 +16,4 @@ func FormatedTime() time.Time {
t := time.Now()
l, _ := time.LoadLocation("Europe/Berlin")
return time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), int(math.Round(float64(t.Nanosecond())/1000000)*1000000), l)
}