confluence-go-api
                                
                                
                                
                                    confluence-go-api copied to clipboard
                            
                            
                            
                        Search user by key
Is your feature request related to a problem? Please describe. When i read certain pages on our confluence i get back the ri:user that has a userkey identifier. In order to retrieve the user i need to be able to search by key instead of username and accountId
Describe the solution you'd like To support this, in the user.go file change this
if strings.Contains(query, ":") {
	data.Set("accountId", strings.Split(query, ":")[1])
} else {
	data.Set("username", query)
}
to this
if strings.Contains(query, ":") {
	customLookup := strings.Split(query, ":")
	if customLookup[0] == "key" {
		data.Set("key", customLookup[1])
	} else {
		data.Set("accountId", customLookup[1])
	}
} else {
	data.Set("username", query)
}