MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / unescapePackageString

Function unescapePackageString

pkg/packages/packages.go:250–262  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

248}
249
250func unescapePackageString(s string) string {
251 var result strings.Builder
252 result.Grow(len(s))
253 for i := 0; i < len(s); i++ {
254 if s[i] == '\\' && i+1 < len(s) && isEscapableDelimiter(s[i+1]) {
255 result.WriteByte(s[i+1])
256 i++
257 continue
258 }
259 result.WriteByte(s[i])
260 }
261 return result.String()
262}
263
264func escapePackageDelimiters(s string) string {
265 var result strings.Builder

Callers 1

Calls 1

isEscapableDelimiterFunction · 0.85

Tested by

no test coverage detected