Trying to use a slice of type time.Time but it won't recognize time.Time as a type. Getting error time.Time undefined (type int has no field or method Time) I have imported time at the top in my imports and declared it as
var alarmTime []time.Time
but with no luck.
Any ideas anyone?
add import "time"
at the top of your file (after the package ...
statement)
You obviously have a variable named "time"
, of type int
, somewhere in your code.
Find it and remove it.