mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
20 lines
705 B
Go
20 lines
705 B
Go
// This file is Free Software under the MIT License
|
|
// without warranty, see README.md and LICENSES/MIT.txt for details.
|
|
//
|
|
// SPDX-License-Identifier: MIT
|
|
//
|
|
// SPDX-FileCopyrightText: 2022 German Federal Office for Information Security (BSI) <https://www.bsi.bund.de>
|
|
// Software-Engineering: 2022 Intevation GmbH <https://intevation.de>
|
|
|
|
//go:build go1.19
|
|
|
|
package util
|
|
|
|
import "net/url"
|
|
|
|
// JoinURLPath returns a new URL with the provided path elements joined to
|
|
// any existing path and the resulting path cleaned of any ./ or ../ elements.
|
|
// Any sequences of multiple / characters will be reduced to a single /.
|
|
func JoinURLPath(u *url.URL, elem ...string) *url.URL {
|
|
return u.JoinPath(elem...)
|
|
}
|