Skip to content

Can one use Query Params that have duplicate keys? #229

Answered by mikequentel
mikequentel asked this question in Q&A
Discussion options

You must be logged in to vote

Work-around solution

Use a comma-delimited string for the value, then check for this situation and set the struct members accordingly. In other words, so that the Query Param can be myparam and the values value1,value2,value3 etc.

	issueLinkTypeNameExcludes, issueLinkTypeNameExcludesParamExists := c.GetQuery("issueLinkTypeNameExcludes")
	if issueLinkTypeNameExcludesParamExists == true {
		if strings.Contains(issueLinkTypeNameExcludes, ",") {
			qry.IssueLinkTypeNameExcludes = strings.Split(issueLinkTypeNameExcludes, ",")
		}
	}
	issueLinkStatusExcludes, issueLinkStatusExcludesParamExists := c.GetQuery("issueLinkStatusExcludes")
	if issueLinkStatusExcludesParamExists == true {
		if strings…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mikequentel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant