У меня есть такая структура:
// Nearby whatever
type Nearby struct {
id int `json:"id,omitempty"`
me int `json:"me,omitempty"`
you int `json:"you,omitempty"`
contactTime string `json:"contactTime,omitempty"`
}
, а затем я называю это:
strconv.Itoa(time.Now())
примерно так:
s1 := Nearby{id: 1, me: 1, you: 2, contactTime: strconv.Itoa(time.Now())}
но там написано:
> cannot use time.Now() (type time.Time) as type int in argument to
> strconv.Itoa
кто-нибудь знает, о чем это?Я пытаюсь преобразовать int в строку здесь.