Added a new layer: engine (equivalent to use cases in Clean Architecture). Should make testing things easier

This commit is contained in:
Deluan
2016-03-07 10:57:32 -05:00
parent 56e9ad3def
commit 91c660c746
6 changed files with 91 additions and 39 deletions
+11
View File
@@ -0,0 +1,11 @@
package utils
import "time"
func ToTime(millis int64) time.Time {
return time.Unix(0, millis*int64(time.Millisecond))
}
func ToMillis(t time.Time) int64 {
return t.UnixNano() / int64(time.Millisecond)
}