I'm currently working on a project and I face a problem in a function that returns the startTime
of a call. Here is my code:
func (bt *Hc34) getStartDate(endTime time.Time, duration int) time.Time {
startTime := endTime
startTime.Second = endTime.Second - duration
return startTime
}
And I get this error:
beater/hc34.go:268: invalid operation: endTime.Second - duration (mismatched types func() int and int)
beater/hc34.go:268: cannot assign to startTime.Second