@@ -49,7 +49,7 @@ type Cache struct {
4949}
5050
5151// WithAutoRefresh returns an option to control automatic Cache refresh.
52- // By default auto-refresh is enabled, the list of Spec directories are
52+ // By default, auto-refresh is enabled, the list of Spec directories are
5353// monitored and the Cache is automatically refreshed whenever a change
5454// is detected. This option can be used to disable this behavior when a
5555// manually refreshed mode is preferable.
@@ -203,7 +203,7 @@ func (c *Cache) refresh() error {
203203// RefreshIfRequired triggers a refresh if necessary.
204204func (c * Cache ) refreshIfRequired (force bool ) (bool , error ) {
205205 // We need to refresh if
206- // - it's forced by an explicitly call to Refresh() in manual mode
206+ // - it's forced by an explicit call to Refresh() in manual mode
207207 // - a missing Spec dir appears (added to watch) in auto-refresh mode
208208 if force || (c .autoRefresh && c .watch .update (c .dirErrors )) {
209209 return true , c .refresh ()
@@ -244,7 +244,7 @@ func (c *Cache) InjectDevices(ociSpec *oci.Spec, devices ...string) ([]string, e
244244
245245 if unresolved != nil {
246246 return unresolved , fmt .Errorf ("unresolvable CDI devices %s" ,
247- strings .Join (devices , ", " ))
247+ strings .Join (unresolved , ", " ))
248248 }
249249
250250 if err := edits .Apply (ociSpec ); err != nil {
0 commit comments