cmd/viewer: import views when generating byteSliceField

Updates #cleanup

Signed-off-by: Percy Wegmann <percy@tailscale.com>
This commit is contained in:
Percy Wegmann 2024-03-07 15:07:12 -06:00 committed by Percy Wegmann
parent f072d017bd
commit 16ae0f65c0

View File

@ -172,6 +172,7 @@ func genView(buf *bytes.Buffer, it *codegen.ImportTracker, typ *types.Named, thi
switch elem.String() { switch elem.String() {
case "byte": case "byte":
args.FieldType = it.QualifiedName(fieldType) args.FieldType = it.QualifiedName(fieldType)
it.Import("tailscale.com/types/views")
writeTemplate("byteSliceField") writeTemplate("byteSliceField")
default: default:
args.FieldType = it.QualifiedName(elem) args.FieldType = it.QualifiedName(elem)