Skip to content

Commit

Permalink
Use common library reporter
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Blecker <[email protected]>
  • Loading branch information
cblecker committed Jan 25, 2023
1 parent b3b2c73 commit a99c508
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/skopeo/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"io"
"strings"
"text/tabwriter"
"text/template"

"github.com/containers/common/pkg/report"
"github.com/containers/common/pkg/retry"
Expand Down Expand Up @@ -241,7 +240,7 @@ func (opts *inspectOptions) run(args []string, stdout io.Writer) (retErr error)
}

func printTmpl(stdout io.Writer, row string, data []interface{}) error {
t, err := template.New("skopeo inspect").Parse(row)
t, err := report.NewTemplate("skopeo inspect").Parse(row)
if err != nil {
return err
}
Expand Down
1 change: 1 addition & 0 deletions docs/skopeo-inspect.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Use docker daemon host at _host_ (`docker-daemon:` transport only)

Format the output using the given Go template.
The keys of the returned JSON can be used as the values for the --format flag (see examples below).
Supports the templating functions available here: https://pkg.go.dev/github.com/containers/common/pkg/report#hdr-Template_Functions

**--help**, **-h**

Expand Down

0 comments on commit a99c508

Please sign in to comment.