traefik/vendor/github.com/jjcollinge/servicefabric/query.go

21 lines
400 B
Go
Raw Normal View History

2017-11-27 13:26:04 +00:00
package servicefabric
type queryParamsFunc func(params []string) []string
func withContinue(token string) queryParamsFunc {
if len(token) == 0 {
return noOp
}
return withParam("continue", token)
}
func withParam(name, value string) queryParamsFunc {
return func(params []string) []string {
return append(params, name+"="+value)
}
}
func noOp(params []string) []string {
return params
}