Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lucklove committed Nov 23, 2020
1 parent 75553c1 commit 986fe85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/repository/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (l *localFilesystem) Publish(manifest *v1manifest.Manifest, info model.Comp
return nil
}

// Introduce implements the model.Backend interface
// Grant implements the model.Backend interface
func (l *localFilesystem) Grant(id, name string, key *v1manifest.KeyInfo) error {
txn, err := store.New(l.rootPath, l.upstream).Begin()
if err != nil {
Expand Down Expand Up @@ -336,7 +336,7 @@ func (l *httpMirror) prepareURL(resource string) string {
return url
}

// Introduce implements the model.Backend interface
// Grant implements the model.Backend interface
func (l *httpMirror) Grant(id, name string, key *v1manifest.KeyInfo) error {
return errors.Errorf("introduce a fresher via the internet is not allowd, please set you mirror to a local one")
}
Expand Down Expand Up @@ -499,7 +499,7 @@ func (l *MockMirror) Download(resource, targetDir string) error {
return err
}

// Introduce implements the model.Backend interface
// Grant implements the model.Backend interface
func (l *MockMirror) Grant(id, name string, key *v1manifest.KeyInfo) error {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/repository/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func New(txn store.FsTxn, keys map[string]*v1manifest.KeyInfo) Backend {
return &model{txn, keys}
}

// Introduce implements Backend
// Grant implements Backend
func (m *model) Grant(id, name string, key *v1manifest.KeyInfo) error {
initTime := time.Now()

Expand Down

0 comments on commit 986fe85

Please sign in to comment.