I want to have a struct like this:
type Person struct { Name string DateJoined time }
But this struct will not compile, because there is no type time, isn't it? Should I alternatively use a string and insert the time / date information there?
time
string
time isn't a type. time.Time is. See the package docs for the types: http://golang.org/pkg/time/
time.Time
import time type Person struct { Name string DateJoined time.Time }
1.4m articles
1.4m replys
5 comments
57.0k users