buildx icon indicating copy to clipboard operation
buildx copied to clipboard

imagetools: use docker/cli formatting

Open uhthomas opened this issue 2 years ago • 1 comments

Use the formatting packages provided by docker/cli to comply with the official formatting documentation.

https://docs.docker.com/config/formatting/

The use of the official formatting packages also fixes the format templating.

Fixes: #1175

uhthomas avatar Jun 14 '23 18:06 uhthomas

@thaJeztah, this isn't finished but I thought it would be good to create a draft PR for some early feedback. I was initially just going to fix the formatting directive, but thought it would be nicer to make use of github.com/docker/cli/cli/command/inspect and github.com/docker/cli/cli/command/formatter. Using the formatting package should result in a lot less duplicate code, and would be consistent with docker/cli.

What are your thoughts?

uhthomas avatar Jun 14 '23 18:06 uhthomas