cue vet
with bytes type
#1155
Replies: 2 comments
-
@joelanford welcome to the CUE project! This looks like a bug, or more specifically a feature we haven't yet implemented totally in Please can you raise a feature request issue for this? |
Beta Was this translation helpful? Give feedback.
-
Hello, I've also run into this issue with CUE import "encoding/base64"
#base64Bytes: input={
string
#valid: base64.Decode(null, input)
}
b: #base64Bytes & "aGVsbG8sIHdvcmxkIQo="
// c: #base64Bytes & "$$$" // uncomment to see error Ideally I would like to be able to use the |
Beta Was this translation helpful? Give feedback.
-
I'm hoping to use
cue vet
to vet a JSON struct that contains a base64 encoded string, so I'd like my cue schema to contain abytes
field. Howevercue vet
interprets my JSON struct as astring
(technically, it is) and complains that it is not abytes
(even though it was exported from abytes
field). Is there any way to vet base64 encoded strings as bytes?Given the follow files:
schema.cue
bytes.cue
I expect to be able to export JSON and then vet it, but
vet
fails.Beta Was this translation helpful? Give feedback.
All reactions