mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 09:17:49 +08:00
Merge pull request #1003 from developer-guy/feature/1001
feat: printing driver options
This commit is contained in:
commit
1ca30a58c2
@ -79,6 +79,7 @@ func runInspect(dockerCli command.Cli, in inspectOptions) error {
|
||||
w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', 0)
|
||||
fmt.Fprintf(w, "Name:\t%s\n", ngi.ng.Name)
|
||||
fmt.Fprintf(w, "Driver:\t%s\n", ngi.ng.Driver)
|
||||
|
||||
if err != nil {
|
||||
fmt.Fprintf(w, "Error:\t%s\n", err.Error())
|
||||
} else if ngi.err != nil {
|
||||
@ -94,6 +95,16 @@ func runInspect(dockerCli command.Cli, in inspectOptions) error {
|
||||
}
|
||||
fmt.Fprintf(w, "Name:\t%s\n", n.Name)
|
||||
fmt.Fprintf(w, "Endpoint:\t%s\n", n.Endpoint)
|
||||
|
||||
var driverOpts []string
|
||||
for k, v := range n.DriverOpts {
|
||||
driverOpts = append(driverOpts, fmt.Sprintf("\t%s=%s\n", k, v))
|
||||
}
|
||||
|
||||
if len(driverOpts) > 0 {
|
||||
fmt.Fprintf(w, "Driver Options: %s", strings.Join(driverOpts, ","))
|
||||
}
|
||||
|
||||
if err := ngi.drivers[i].di.Err; err != nil {
|
||||
fmt.Fprintf(w, "Error:\t%s\n", err.Error())
|
||||
} else if err := ngi.drivers[i].err; err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user