Skip to content

Commit fbc29ce

Browse files
committed
Use github.com/smallstep/cli-utils and reorder imports
1 parent 897b9de commit fbc29ce

File tree

134 files changed

+659
-441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+659
-441
lines changed

command/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ should exist within its own package if possible. For example, `version` and
1212
Any package used by a command but does not contain explicit business logic
1313
directly related to the command should exist in the top-level of this
1414
repository. For example, the `github.com/smallstep/cli/flags` and
15-
`go.step.sm/cli-utils/errs` package are used by many different commands and
15+
`github.com/smallstep/cli-utils/errs` package are used by many different commands and
1616
contain functionality for defining flags and creating/manipulating errors.
1717

1818
### Adding a Command
@@ -70,8 +70,8 @@ There are three packages which contain functionality to make writing commands ea
7070

7171
- `github.com/smallstep/cli/flags`
7272
- `github.com/smallstep/cli/prompts`
73-
- `go.step.sm/cli-utils/errs`
74-
- `go.step.sm/cli-utils/usage`
73+
- `github.com/smallstep/cli-utils/errs`
74+
- `github.com/smallstep/cli-utils/usage`
7575

7676
The usage package is used to extend the default documentation provided by
7777
`urfave/cli` by enabling us to document arguments, whether they are optional or

command/api/api.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package api
22

33
import (
4-
"github.com/smallstep/cli/command/api/token"
54
"github.com/urfave/cli"
6-
"go.step.sm/cli-utils/command"
5+
6+
"github.com/smallstep/cli-utils/command"
7+
8+
"github.com/smallstep/cli/command/api/token"
79
)
810

911
func init() {

command/api/token/create.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ import (
1212

1313
"github.com/google/uuid"
1414
"github.com/urfave/cli"
15-
"go.step.sm/cli-utils/errs"
16-
"go.step.sm/cli-utils/ui"
15+
16+
"github.com/smallstep/cli-utils/errs"
17+
"github.com/smallstep/cli-utils/ui"
1718
)
1819

1920
func createCommand() cli.Command {

command/base64/base64.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ import (
88
"strings"
99

1010
"github.com/pkg/errors"
11-
"github.com/smallstep/cli/utils"
1211
"github.com/urfave/cli"
13-
"go.step.sm/cli-utils/command"
12+
13+
"github.com/smallstep/cli-utils/command"
14+
15+
"github.com/smallstep/cli/utils"
1416
)
1517

1618
func init() {

command/beta/beta.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package beta
22

33
import (
4-
"github.com/smallstep/cli/command/ca"
54
"github.com/urfave/cli"
6-
"go.step.sm/cli-utils/command"
5+
6+
"github.com/smallstep/cli-utils/command"
7+
8+
"github.com/smallstep/cli/command/ca"
79
)
810

911
// init creates and registers the ca command

command/ca/acme/eab/add.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"github.com/pkg/errors"
88
"github.com/urfave/cli"
99

10-
"go.step.sm/cli-utils/errs"
11-
1210
adminAPI "github.com/smallstep/certificates/authority/admin/api"
11+
"github.com/smallstep/cli-utils/errs"
12+
1313
"github.com/smallstep/cli/flags"
1414
"github.com/smallstep/cli/utils/cautils"
1515
)

command/ca/acme/eab/list.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import (
88

99
"github.com/pkg/errors"
1010
"github.com/urfave/cli"
11-
"go.step.sm/cli-utils/errs"
1211

1312
"github.com/smallstep/certificates/ca"
13+
"github.com/smallstep/cli-utils/errs"
14+
1415
"github.com/smallstep/cli/flags"
1516
"github.com/smallstep/cli/utils/cautils"
1617
)

command/ca/acme/eab/remove.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/pkg/errors"
77
"github.com/urfave/cli"
88

9-
"go.step.sm/cli-utils/errs"
9+
"github.com/smallstep/cli-utils/errs"
1010

1111
"github.com/smallstep/cli/flags"
1212
"github.com/smallstep/cli/utils/cautils"

command/ca/admin/add.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import (
55
"os"
66
"text/tabwriter"
77

8+
"github.com/urfave/cli"
9+
810
adminAPI "github.com/smallstep/certificates/authority/admin/api"
11+
"github.com/smallstep/cli-utils/errs"
12+
"go.step.sm/linkedca"
13+
914
"github.com/smallstep/cli/flags"
1015
"github.com/smallstep/cli/utils/cautils"
11-
"github.com/urfave/cli"
12-
"go.step.sm/cli-utils/errs"
13-
"go.step.sm/linkedca"
1416
)
1517

1618
func addCommand() cli.Command {

command/ca/admin/admin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import (
44
"errors"
55
"fmt"
66

7-
"github.com/smallstep/certificates/ca"
87
"github.com/urfave/cli"
98

10-
"go.step.sm/cli-utils/errs"
11-
"go.step.sm/cli-utils/ui"
9+
"github.com/smallstep/certificates/ca"
10+
"github.com/smallstep/cli-utils/errs"
11+
"github.com/smallstep/cli-utils/ui"
1212
"go.step.sm/linkedca"
1313
)
1414

command/ca/admin/list.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import (
55
"os"
66
"text/tabwriter"
77

8-
"github.com/smallstep/cli/flags"
9-
"github.com/smallstep/cli/utils/cautils"
108
"github.com/urfave/cli"
11-
"go.step.sm/cli-utils/errs"
9+
10+
"github.com/smallstep/cli-utils/errs"
1211
"go.step.sm/linkedca"
12+
13+
"github.com/smallstep/cli/flags"
14+
"github.com/smallstep/cli/utils/cautils"
1315
)
1416

1517
func listCommand() cli.Command {

command/ca/admin/remove.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package admin
22

33
import (
4+
"github.com/urfave/cli"
5+
6+
"github.com/smallstep/cli-utils/errs"
7+
48
"github.com/smallstep/cli/flags"
59
"github.com/smallstep/cli/utils/cautils"
6-
"github.com/urfave/cli"
7-
"go.step.sm/cli-utils/errs"
810
)
911

1012
func removeCommand() cli.Command {

command/ca/admin/update.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import (
55
"os"
66
"text/tabwriter"
77

8+
"github.com/urfave/cli"
9+
810
adminAPI "github.com/smallstep/certificates/authority/admin/api"
11+
"github.com/smallstep/cli-utils/errs"
12+
"go.step.sm/linkedca"
13+
914
"github.com/smallstep/cli/flags"
1015
"github.com/smallstep/cli/utils/cautils"
11-
"github.com/urfave/cli"
12-
"go.step.sm/cli-utils/errs"
13-
"go.step.sm/linkedca"
1416
)
1517

1618
func updateCommand() cli.Command {

command/ca/bootstrap.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ package ca
33
import (
44
"strings"
55

6+
"github.com/urfave/cli"
7+
8+
"github.com/smallstep/cli-utils/command"
9+
"github.com/smallstep/cli-utils/errs"
10+
611
"github.com/smallstep/cli/flags"
712
"github.com/smallstep/cli/utils/cautils"
8-
"github.com/urfave/cli"
9-
"go.step.sm/cli-utils/command"
10-
"go.step.sm/cli-utils/errs"
1113
)
1214

1315
func bootstrapCommand() cli.Command {

command/ca/ca.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package ca
22

33
import (
4+
"github.com/urfave/cli"
5+
6+
"github.com/smallstep/cli-utils/command"
7+
48
"github.com/smallstep/cli/command/ca/acme"
59
"github.com/smallstep/cli/command/ca/admin"
610
"github.com/smallstep/cli/command/ca/policy"
711
"github.com/smallstep/cli/command/ca/provisioner"
8-
"github.com/urfave/cli"
9-
"go.step.sm/cli-utils/command"
1012
)
1113

1214
// init creates and registers the ca command

command/ca/certificate.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ import (
55
"strings"
66

77
"github.com/pkg/errors"
8+
"github.com/urfave/cli"
9+
10+
"github.com/smallstep/cli-utils/command"
11+
"github.com/smallstep/cli-utils/errs"
12+
"github.com/smallstep/cli-utils/step"
13+
"github.com/smallstep/cli-utils/ui"
14+
"go.step.sm/crypto/pemutil"
15+
816
"github.com/smallstep/cli/flags"
917
"github.com/smallstep/cli/token"
1018
"github.com/smallstep/cli/utils/cautils"
11-
"github.com/urfave/cli"
12-
"go.step.sm/cli-utils/command"
13-
"go.step.sm/cli-utils/errs"
14-
"go.step.sm/cli-utils/step"
15-
"go.step.sm/cli-utils/ui"
16-
"go.step.sm/crypto/pemutil"
1719
)
1820

1921
func certificateCommand() cli.Command {

command/ca/federation.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ import (
66
"os"
77

88
"github.com/pkg/errors"
9+
"github.com/urfave/cli"
10+
911
"github.com/smallstep/certificates/api"
1012
"github.com/smallstep/certificates/ca"
1113
"github.com/smallstep/certificates/pki"
14+
"github.com/smallstep/cli-utils/command"
15+
"github.com/smallstep/cli-utils/errs"
16+
"github.com/smallstep/cli-utils/ui"
17+
"go.step.sm/crypto/pemutil"
18+
1219
"github.com/smallstep/cli/flags"
1320
"github.com/smallstep/cli/utils"
14-
"github.com/urfave/cli"
15-
"go.step.sm/cli-utils/command"
16-
"go.step.sm/cli-utils/errs"
17-
"go.step.sm/cli-utils/ui"
18-
"go.step.sm/crypto/pemutil"
1921
)
2022

2123
type flowType int

command/ca/health.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import (
55
"fmt"
66
"os"
77

8+
"github.com/urfave/cli"
9+
810
"github.com/smallstep/certificates/ca"
911
"github.com/smallstep/certificates/pki"
12+
"github.com/smallstep/cli-utils/errs"
13+
1014
"github.com/smallstep/cli/flags"
11-
"github.com/urfave/cli"
12-
"go.step.sm/cli-utils/errs"
1315
)
1416

1517
func healthCommand() cli.Command {

command/ca/init.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,20 @@ import (
1414

1515
"github.com/manifoldco/promptui"
1616
"github.com/pkg/errors"
17-
"github.com/smallstep/certificates/cas/apiv1"
18-
"github.com/smallstep/certificates/pki"
19-
"github.com/smallstep/cli/flags"
20-
"github.com/smallstep/cli/utils"
21-
"github.com/smallstep/cli/utils/cautils"
2217
"github.com/urfave/cli"
2318

24-
"go.step.sm/cli-utils/errs"
25-
"go.step.sm/cli-utils/step"
26-
"go.step.sm/cli-utils/ui"
19+
"github.com/smallstep/certificates/cas/apiv1"
20+
"github.com/smallstep/certificates/pki"
21+
"github.com/smallstep/cli-utils/errs"
22+
"github.com/smallstep/cli-utils/step"
23+
"github.com/smallstep/cli-utils/ui"
2724
"go.step.sm/crypto/kms"
25+
_ "go.step.sm/crypto/kms/azurekms" // enable azurekms
2826
"go.step.sm/crypto/pemutil"
2927

30-
// Enable azurekms
31-
_ "go.step.sm/crypto/kms/azurekms"
28+
"github.com/smallstep/cli/flags"
29+
"github.com/smallstep/cli/utils"
30+
"github.com/smallstep/cli/utils/cautils"
3231
)
3332

3433
func initCommand() cli.Command {

command/ca/policy/actions/cn.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import (
66
"fmt"
77

88
"github.com/urfave/cli"
9-
"go.step.sm/cli-utils/errs"
9+
10+
"github.com/smallstep/cli-utils/errs"
1011

1112
"github.com/smallstep/cli/command/ca/policy/policycontext"
1213
"github.com/smallstep/cli/flags"

command/ca/policy/actions/dns.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import (
66
"fmt"
77

88
"github.com/urfave/cli"
9-
"go.step.sm/cli-utils/errs"
9+
10+
"github.com/smallstep/cli-utils/errs"
1011

1112
"github.com/smallstep/cli/command/ca/policy/policycontext"
1213
"github.com/smallstep/cli/flags"

command/ca/policy/actions/emails.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import (
66
"fmt"
77

88
"github.com/urfave/cli"
9-
"go.step.sm/cli-utils/errs"
9+
10+
"github.com/smallstep/cli-utils/errs"
1011

1112
"github.com/smallstep/cli/command/ca/policy/policycontext"
1213
"github.com/smallstep/cli/flags"

command/ca/policy/actions/ips.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import (
66
"fmt"
77

88
"github.com/urfave/cli"
9-
"go.step.sm/cli-utils/errs"
9+
10+
"github.com/smallstep/cli-utils/errs"
1011

1112
"github.com/smallstep/cli/command/ca/policy/policycontext"
1213
"github.com/smallstep/cli/flags"

command/ca/policy/actions/policy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"github.com/urfave/cli"
1111
"google.golang.org/protobuf/encoding/protojson"
1212

13-
"go.step.sm/cli-utils/errs"
13+
"github.com/smallstep/certificates/ca"
14+
"github.com/smallstep/cli-utils/errs"
1415
"go.step.sm/linkedca"
1516

16-
"github.com/smallstep/certificates/ca"
1717
"github.com/smallstep/cli/command/ca/policy/policycontext"
1818
"github.com/smallstep/cli/internal/command"
1919
)

command/ca/policy/actions/principals.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import (
66
"fmt"
77

88
"github.com/urfave/cli"
9-
"go.step.sm/cli-utils/errs"
9+
10+
"github.com/smallstep/cli-utils/errs"
1011

1112
"github.com/smallstep/cli/command/ca/policy/policycontext"
1213
"github.com/smallstep/cli/flags"

command/ca/policy/actions/remove.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ import (
55
"errors"
66
"fmt"
77

8+
"github.com/urfave/cli"
9+
810
"github.com/smallstep/certificates/ca"
11+
"github.com/smallstep/cli-utils/errs"
12+
913
"github.com/smallstep/cli/command/ca/policy/policycontext"
1014
"github.com/smallstep/cli/flags"
1115
"github.com/smallstep/cli/internal/command"
1216
"github.com/smallstep/cli/utils/cautils"
13-
"github.com/urfave/cli"
14-
"go.step.sm/cli-utils/errs"
1517
)
1618

1719
// RemoveCommand returns the policy remove subcommand.

0 commit comments

Comments
 (0)