go-jdn is the tool of Julian Day Number.
go get -u github.com/DestinyLab/go-jdn
package main
import (
"fmt"
"time"
"github.com/DestinyLab/go-jdn"
)
func main() {
t1 := time.Date(2018, 4, 13, 0, 0, 0, 0, time.UTC)
fmt.Printf("%v", jdn.ToNumber(t1))
// Output: 2458222
t2 := JDN(2448046).ToTime()
fmt.Printf("%v %v %v\n", t2.Year(), t2.Month(), t2.Day())
// Output: 1990 June 3
}