mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
cmd/mediaapi-integration-tests: Simplify slice initialisation
This commit is contained in:
parent
dac32b386d
commit
82f9ac5cc9
|
|
@ -145,14 +145,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getMediaURI(scheme, host, endpoint string, components []string) string {
|
func getMediaURI(scheme, host, endpoint string, components []string) string {
|
||||||
pathComponents := []string{
|
pathComponents := []string{host, "api/_matrix/media/v1", endpoint}
|
||||||
host,
|
|
||||||
"api",
|
|
||||||
"_matrix",
|
|
||||||
"media",
|
|
||||||
"v1",
|
|
||||||
endpoint,
|
|
||||||
}
|
|
||||||
pathComponents = append(pathComponents, components...)
|
pathComponents = append(pathComponents, components...)
|
||||||
return scheme + path.Join(pathComponents...)
|
return scheme + path.Join(pathComponents...)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue