File tree Expand file tree Collapse file tree 3 files changed +4
-16
lines changed Expand file tree Collapse file tree 3 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,9 @@ import (
12
12
"github.com/coder/coder/v2/codersdk"
13
13
)
14
14
15
- // LicenseFormatterOpts are options for the license formatter.
16
- type LicenseFormatterOpts struct {
17
- Sanitize bool // If true, the UUID of the license will be redacted.
18
- }
19
-
20
15
// NewLicenseFormatter returns a new license formatter.
21
16
// The formatter will return a table and JSON output.
22
- func NewLicenseFormatter (opts LicenseFormatterOpts ) * cliui.OutputFormatter {
17
+ func NewLicenseFormatter () * cliui.OutputFormatter {
23
18
type tableLicense struct {
24
19
ID int32 `table:"id,default_sort"`
25
20
UUID uuid.UUID `table:"uuid" format:"uuid"`
@@ -63,11 +58,6 @@ func NewLicenseFormatter(opts LicenseFormatterOpts) *cliui.OutputFormatter {
63
58
// If this returns an error, a zero time is returned.
64
59
exp , _ := lic .ExpiresAt ()
65
60
66
- // If sanitize is true, we redact the UUID.
67
- if opts .Sanitize {
68
- lic .UUID = uuid .Nil
69
- }
70
-
71
61
out = append (out , tableLicense {
72
62
ID : lic .ID ,
73
63
UUID : lic .UUID ,
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ var supportBundleBlurb = cliui.Bold("This will collect the following information
51
51
- Agent details (with environment variable sanitized)
52
52
- Agent network diagnostics
53
53
- Agent logs
54
- - License status (sanitized)
54
+ - License status
55
55
` + cliui .Bold ("Note: " ) +
56
56
cliui .Wrap ("While we try to sanitize sensitive data from support bundles, we cannot guarantee that they do not contain information that you or your organization may consider sensitive.\n " ) +
57
57
cliui .Bold ("Please confirm that you will:\n " ) +
@@ -371,9 +371,7 @@ func humanizeBuildLogs(ls []codersdk.ProvisionerJobLog) string {
371
371
}
372
372
373
373
func humanizeLicenses (licenses []codersdk.License ) (string , error ) {
374
- formatter := cliutil .NewLicenseFormatter (cliutil.LicenseFormatterOpts {
375
- Sanitize : true ,
376
- })
374
+ formatter := cliutil .NewLicenseFormatter ()
377
375
378
376
if len (licenses ) == 0 {
379
377
return "No licenses found" , nil
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ func validJWT(s string) error {
136
136
}
137
137
138
138
func (r * RootCmd ) licensesList () * serpent.Command {
139
- formatter := cliutil .NewLicenseFormatter (cliutil. LicenseFormatterOpts {} )
139
+ formatter := cliutil .NewLicenseFormatter ()
140
140
client := new (codersdk.Client )
141
141
cmd := & serpent.Command {
142
142
Use : "list" ,
You can’t perform that action at this time.
0 commit comments