mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-15 00:31:30 -05:00
Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 1.10.1 to 1.11.0. - [Release notes](https://github.com/open-policy-agent/opa/releases) - [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-policy-agent/opa/compare/v1.10.1...v1.11.0) --- updated-dependencies: - dependency-name: github.com/open-policy-agent/opa dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
14 lines
278 B
Go
14 lines
278 B
Go
package util
|
|
|
|
import "strings"
|
|
|
|
// WithPrefix ensures that the string s starts with the given prefix.
|
|
// If s already starts with prefix, it is returned unchanged.
|
|
func WithPrefix(s, prefix string) string {
|
|
if strings.HasPrefix(s, prefix) {
|
|
return s
|
|
}
|
|
|
|
return prefix + s
|
|
}
|