I am using this package github.com/dgrijalva/jwt-go/v4
to set up claims in a Login function:
now := time.Now()
claims := &jwt.StandardClaims{
Issuer: "Test",
ExpiresAt: now.Add(time.Hour * 24).Unix(),
}
The IDE keeps telling me:
Cannot use 'now.Add(time.Hour * 24).Unix()' (type int64) as the type Time.
I read that as I have the wrong typed value, however, on all the examples I've seen online, this is exactly how the majority set up this up.
I am still learning go and so I am not sure the proper way to convert this time format into something that is valid.