Skip to content

Commit

Permalink
pull: Use new CLI API.
Browse files Browse the repository at this point in the history
  • Loading branch information
anpep committed Aug 1, 2023
1 parent 3a5d051 commit fb599ca
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions internals/cli/cmd_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ import (
"os"

"github.com/canonical/go-flags"

Check failure on line 20 in internals/cli/cmd_pull.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default -s Prefix(github.com/canonical/pebble) (gci)

"github.com/canonical/pebble/client"
"github.com/canonical/pebble/internals/logger"
)

const cmdPullSummary = "Retrieve a file from the remote system"
const cmdPullDescription = `
The pull command retrieves a file from the remote system.
`

type cmdPull struct {
clientMixin

Expand All @@ -32,10 +36,14 @@ type cmdPull struct {
} `positional-args:"yes"`
}

var shortPullHelp = "Retrieve a file from the remote system"
var longPullHelp = `
The pull command retrieves a file from the remote system.
`
func init() {
AddCommand(&CmdInfo{
Name: "pull",
Summary: cmdPullSummary,
Description: cmdPullDescription,
Builder: func() flags.Commander { return &cmdPull{} },
})
}

func (cmd *cmdPull) Execute(args []string) error {
if len(args) > 0 {
Expand All @@ -62,7 +70,3 @@ func (cmd *cmdPull) Execute(args []string) error {

return nil
}

func init() {
addCommand("pull", shortPullHelp, longPullHelp, func() flags.Commander { return &cmdPull{} }, nil, nil)
}

0 comments on commit fb599ca

Please sign in to comment.