File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
2+ //go:build go1.24
3+
14package hooks
25
36// ResponseType is the type of response from the plugin.
@@ -15,18 +18,18 @@ type Request struct {
1518 // which is currently being invoked. If a hook for `docker context` is
1619 // configured and the user executes `docker context ls`, the plugin will
1720 // be invoked with `context`.
18- RootCmd string
19- Flags map [string ]string
20- CommandError string
21+ RootCmd string `json:"RootCmd,omitzero"`
22+ Flags map [string ]string `json:"Flags,omitzero"`
23+ CommandError string `json:"CommandError,omitzero"`
2124}
2225
2326// Response represents a plugin hook response. Plugins
2427// declaring support for CLI hooks need to print a JSON
2528// representation of this type when their hook subcommand
2629// is invoked.
2730type Response struct {
28- Type ResponseType
29- Template string
31+ Type ResponseType `json:"Type"`
32+ Template string `json:"Template,omitzero"`
3033}
3134
3235// HookType is the type of response from the plugin.
You can’t perform that action at this time.
0 commit comments