I am trying to cast a value to a struct which has a type of time.Time.
The value is:
t := time.Now()
format := "2006-01-02 15:04:05"
Then I am trying to put this into the struct:
response.SetAppData[0].LiveDate = time.Parse(format, t.String())
However I get the error of:
controllers/apps.go:1085: multiple-value time.Parse() in single-value context
I am not sure what I am doing wrong.
Thanks