Browse Source

registry: ParseSearchIndexInfo: remove redundant error-handling

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 năm trước cách đây
mục cha
commit
27698f1d13
1 tập tin đã thay đổi với 1 bổ sung6 xóa
  1. 1 6
      registry/config.go

+ 1 - 6
registry/config.go

@@ -439,10 +439,5 @@ func ParseRepositoryInfo(reposName reference.Named) (*RepositoryInfo, error) {
 // for that.
 func ParseSearchIndexInfo(reposName string) (*registry.IndexInfo, error) {
 	indexName, _ := splitReposSearchTerm(reposName)
-
-	indexInfo, err := newIndexInfo(emptyServiceConfig, indexName)
-	if err != nil {
-		return nil, err
-	}
-	return indexInfo, nil
+	return newIndexInfo(emptyServiceConfig, indexName)
 }