cacheKey string
usage *usageLog
http *http.Client
- clock func() time.Time
}
// Request is one model call. Input holds the input items in order, such as
usage: &usageLog{
path: usagePath,
},
- http: &http.Client{},
- clock: time.Now,
+ http: &http.Client{},
}
}
}
record := usageRecord{
- Date: c.clock().Format(time.RFC3339Nano),
+ Date: time.Now().Format(time.RFC3339Nano),
Model: request.Model,
}