mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-22 04:50:43 -05:00
Bumps [github.com/gookit/config/v2](https://github.com/gookit/config) from 2.2.5 to 2.2.6. - [Release notes](https://github.com/gookit/config/releases) - [Commits](https://github.com/gookit/config/compare/v2.2.5...v2.2.6) --- updated-dependencies: - dependency-name: github.com/gookit/config/v2 dependency-version: 2.2.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
21 lines
521 B
Go
21 lines
521 B
Go
package comfunc
|
|
|
|
import "path/filepath"
|
|
|
|
// JoinPaths2 elements, like the filepath.Join()
|
|
func JoinPaths2(basePath string, elems []string) string {
|
|
paths := make([]string, len(elems)+1)
|
|
paths[0] = basePath
|
|
copy(paths[1:], elems)
|
|
return filepath.Join(paths...)
|
|
}
|
|
|
|
// JoinPaths3 elements, like the filepath.Join()
|
|
func JoinPaths3(basePath, secPath string, elems []string) string {
|
|
paths := make([]string, len(elems)+2)
|
|
paths[0] = basePath
|
|
paths[1] = secPath
|
|
copy(paths[2:], elems)
|
|
return filepath.Join(paths...)
|
|
}
|