mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
client/search: small logic fix
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
This commit is contained in:
parent
22877e1b16
commit
19613feddf
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ func (cli *DockerCli) CmdSearch(args ...string) error {
|
||||||
w := tabwriter.NewWriter(cli.out, 10, 1, 3, ' ', 0)
|
w := tabwriter.NewWriter(cli.out, 10, 1, 3, ' ', 0)
|
||||||
fmt.Fprintf(w, "NAME\tDESCRIPTION\tSTARS\tOFFICIAL\tAUTOMATED\n")
|
fmt.Fprintf(w, "NAME\tDESCRIPTION\tSTARS\tOFFICIAL\tAUTOMATED\n")
|
||||||
for _, res := range results {
|
for _, res := range results {
|
||||||
if ((*automated || *trusted) && (!res.IsTrusted && !res.IsAutomated)) || (int(*stars) > res.StarCount) {
|
if (*automated && !res.IsAutomated) || (int(*stars) > res.StarCount) || (*trusted && !res.IsTrusted) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
desc := strings.Replace(res.Description, "\n", " ", -1)
|
desc := strings.Replace(res.Description, "\n", " ", -1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue