MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / stripLeadingSlash

Function stripLeadingSlash

cli/pkg/k8s/filespec.go:136–139  ·  view source on GitHub ↗
(file string)

Source from the content-addressed store, hash-verified

134}
135
136func stripLeadingSlash(file string) string {
137 // tar strips the leading '/' and '\' if it's there, so we will too
138 return strings.TrimLeft(file, `/\`)
139}
140
141// stripPathShortcuts removes any leading or trailing "../" from a given path
142func stripPathShortcuts(p string) string {

Callers 2

StripSlashesMethod · 0.85
StripSlashesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected