-
Originally opened by @xaque208 in cuelang/cue#878 I see the following Go package that contains some bits about IP address, but I'm unsure how to make use of that from cue. https://github.com/cuelang/cue/blob/master/pkg/net/ip.go I'd like to ensure that a yaml document might have a value with a real IP type, for example. Advise welcome. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Original reply by @myitcv in cuelang/cue#878 (comment) @xaque208 this is a bit subtle, not least because of #863. There is a constant goal to improve documentation and with the release yesterday of The subtle point here is that
If you run the above as follows:
|
Beta Was this translation helpful? Give feedback.
Original reply by @myitcv in cuelang/cue#878 (comment)
@xaque208 this is a bit subtle, not least because of #863. There is a constant goal to improve documentation and with the release yesterday of
v0.3.0
we can start to take more steps towards that goal.The subtle point here is that
net.IP()
can be used as a zero-argument constraint, even though it appears it requires and argument:If you run the above as follows: