Skip to content

Commit ed7587f

Browse files
committed
refactor: move cloud flag to pro
1 parent ed4bace commit ed7587f

File tree

7 files changed

+5
-5
lines changed

7 files changed

+5
-5
lines changed

pkg/commands/pro/run.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import (
66

77
"golang.org/x/xerrors"
88

9-
"github.com/aquasecurity/trivy/pkg/cloud"
10-
"github.com/aquasecurity/trivy/pkg/cloud/hooks"
119
"github.com/aquasecurity/trivy/pkg/extension"
1210
"github.com/aquasecurity/trivy/pkg/flag"
1311
"github.com/aquasecurity/trivy/pkg/log"
12+
"github.com/aquasecurity/trivy/pkg/pro"
13+
"github.com/aquasecurity/trivy/pkg/pro/hooks"
1414
"github.com/aquasecurity/trivy/pkg/types"
1515
)
1616

@@ -23,7 +23,7 @@ func UpdateOptsForProIntegration(ctx context.Context, opts *flag.Options) error
2323
}
2424

2525
logger := log.WithPrefix(log.PrefixCloud)
26-
accessToken, err := cloud.GetAccessToken(ctx, *opts)
26+
accessToken, err := pro.GetAccessToken(ctx, *opts)
2727
if err != nil {
2828
return xerrors.Errorf("failed to get access token for Trivy Pro: %w", err)
2929
}
@@ -40,7 +40,7 @@ func UpdateOptsForProIntegration(ctx context.Context, opts *flag.Options) error
4040
}
4141

4242
if opts.ProOptions.SecretConfig && opts.Scanners.Enabled(types.SecretScanner) {
43-
if err := cloud.GetConfigs(ctx, opts, accessToken); err != nil {
43+
if err := pro.GetConfigs(ctx, opts, accessToken); err != nil {
4444
return xerrors.Errorf("failed to download configs: %w", err)
4545
}
4646
}
File renamed without changes.

pkg/cloud/config_test.go renamed to pkg/pro/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cloud
1+
package pro
22

33
import (
44
"context"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)