Refactor trust view command into a --pretty flag on trust inspect #934
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Nassim 'Nass' Eddequiouaq eddequiouaq.nassim@gmail.com
- What I did
docker trust view
which contains the same information asdocker trust inspect
but in a pretty-print format.--pretty
flag ondocker trust inspect
(same asdocker service inspect [--pretty]
).docker trust view
to testdocker trust inspect --pretty
instead with the new output format (some duplicates tests are now present because the two original commands had some similar tests)docker trust inspect --pretty
(olddocker trust view
) now accepts several images as parameters to inspect (used to be limited to 1, butdocker trust inspect
accepts several images so we had to keep consistency)- How I did it
For now (I'll refactor that later),
docker trust inspect
executes the old codepath if no--pretty
flag is provided on the cli, otherwise executesdocker trust view
's codepath for each image arguments.- How to verify it
$ make -f docker.Makefile test
and
$ docker-dev trust inspect [--pretty] nginx:latest redis:latest docker:dind
- Description for the changelog
docker trust view
to a--pretty
flag ondocker trust inspect
. Thedocker trust view
has been removed.