Skip to content

Globbing object keys in rego #160

Discussion options

You must be logged in to vote

Hi Alam 👋 When iterating over the data.sources, you'd want to pass the key rather than the value (as that is an object) to the glob.match function. This should do it:

source = s {
	s := data.sources[k]
	glob.match(k, ["/"], input.source)	
}

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@aflmp
Comment options

@anderseknert
Comment options

@aflmp
Comment options

@anderseknert
Comment options

@aflmp
Comment options

Answer selected by aflmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants