-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathlist.go
More file actions
31 lines (25 loc) · 817 Bytes
/
list.go
File metadata and controls
31 lines (25 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package dictionary
import (
"io"
newcmd "github.com/fastly/cli/pkg/commands/service/dictionary"
"github.com/fastly/cli/pkg/argparser"
"github.com/fastly/cli/pkg/global"
"github.com/fastly/cli/pkg/text"
)
// ListCommand wraps the ListCommand from the newcmd package.
type ListCommand struct {
*newcmd.ListCommand
}
// NewListCommand returns a usable command registered under the parent.
func NewListCommand(parent argparser.Registerer, g *global.Data) *ListCommand {
c := ListCommand{newcmd.NewListCommand(parent, g)}
c.CmdClause.Hidden()
return &c
}
// Exec implements the command interface.
func (c *ListCommand) Exec(in io.Reader, out io.Writer) error {
if !c.JSONOutput.Enabled {
text.Deprecated(out, "Use the 'service dictionary list' command instead.")
}
return c.ListCommand.Exec(in, out)
}