Skip to content

Commit 24c5b2e

Browse files
committed
catalog: make DescriptorType unredactable
Release note: None
1 parent 221c3df commit 24c5b2e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pkg/sql/catalog/descriptor.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ import (
3131
// DescriptorType is a symbol representing the (sub)type of a descriptor.
3232
type DescriptorType string
3333

34+
var _ redact.SafeValue = DescriptorType("")
35+
36+
// SafeValue implements redact.SafeValue.
37+
func (DescriptorType) SafeValue() {}
38+
3439
const (
3540
// Any represents any descriptor.
3641
Any DescriptorType = "any"

pkg/testutils/lint/passes/redactcheck/redactcheck.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ func runAnalyzer(pass *analysis.Pass) (interface{}, error) {
174174
"github.com/cockroachdb/cockroach/pkg/server/license": {
175175
"LicType": {},
176176
},
177+
"github.com/cockroachdb/cockroach/pkg/sql/catalog": {
178+
"DescriptorType": {},
179+
},
177180
"github.com/cockroachdb/cockroach/pkg/sql/catalog/catpb": {
178181
"JobID": {},
179182
"PolicyCommand": {},

0 commit comments

Comments
 (0)