@@ -121,7 +121,7 @@ rhoas service-registry artifact list --page=2 --limit=10
121121 cmd .Flags ().Int32VarP (& opts .limit , "limit" , "" , 100 , "Page limit" )
122122
123123 cmd .Flags ().StringVarP (& opts .registryID , "instance-id" , "" , "" , "Id of the registry to be used. By default uses currently selected registry" )
124- cmd .Flags ().StringVarP (& opts .outputFormat , "output" , "o" , "" , "Output format (json, yaml, yml, table )" )
124+ cmd .Flags ().StringVarP (& opts .outputFormat , "output" , "o" , "" , "Output format (json, yaml, yml)" )
125125
126126 flagutil .EnableOutputFlagCompletion (cmd )
127127
@@ -162,12 +162,6 @@ func runList(opts *Options) error {
162162 return registryinstanceerror .TransformError (err )
163163 }
164164
165- totalCount := opts .page * opts .limit
166- if len (response .Artifacts ) != 0 && response .GetCount () < totalCount {
167- logger .Info ("Provided limit and page arguments are larger than total count of elements on the server" , response .GetCount ())
168- return nil
169- }
170-
171165 if len (response .Artifacts ) == 0 && opts .outputFormat == "" {
172166 logger .Info ("No artifacts available for " + opts .group + " group and registry id " + opts .registryID )
173167 return nil
@@ -181,19 +175,19 @@ func runList(opts *Options) error {
181175 data , _ := yaml .Marshal (response )
182176 _ = dump .YAML (opts .IO .Out , data )
183177 default :
184- rows := mapResponseItemsToRows (& response .Artifacts )
178+ rows := mapResponseItemsToRows (response .Artifacts )
185179 dump .Table (opts .IO .Out , rows )
186180 logger .Info ("" )
187181 }
188182
189183 return nil
190184}
191185
192- func mapResponseItemsToRows (artifacts * []registryinstanceclient.SearchedArtifact ) []artifactRow {
186+ func mapResponseItemsToRows (artifacts []registryinstanceclient.SearchedArtifact ) []artifactRow {
193187 rows := []artifactRow {}
194188
195- for i := range * artifacts {
196- k := (* artifacts )[i ]
189+ for i := range artifacts {
190+ k := (artifacts )[i ]
197191 row := artifactRow {
198192 Id : k .GetId (),
199193 Name : k .GetName (),
0 commit comments