#Is this a valid struct field tag to work with the reflect.struct_tag_lookup proc?

1 messages · Page 1 of 1 (latest)

pallid nebula
#

I have this struct field:

far_plane: f32 `range: "0.1, 1000.0"`,

My editor uses the struct_tag_lookup proc to get the range tag on a field to provide a nice ui slider. However i recently noticed it stopped happening. struct_tag_lookup always fails to parse the tag:

range_str, ok := reflect.struct_tag_lookup(field.tag, "range")

Printing field.tag will output range: "0.1, 1000.0" but ok is always false(and range_str is empty). So i gues the format i put it in is wrong?

sullen cedar
#

Remove the space after the colon?

pallid nebula
#

yup, that was it

#

wait, is the space used to specify multiple tags?

sullen cedar
#

Yes?