MCPcopy Create free account
hub / github.com/bufbuild/buf / Normalize

Function Normalize

private/pkg/normalpath/normalpath.go:110–112  ·  view source on GitHub ↗

Normalize normalizes the given path. This calls filepath.Clean and filepath.ToSlash on the path. If the path is "" or ".", this returns ".".

(path string)

Source from the content-addressed store, hash-verified

108// This calls filepath.Clean and filepath.ToSlash on the path.
109// If the path is "" or ".", this returns ".".
110func Normalize(path string) string {
111 return filepath.ToSlash(filepath.Clean(path))
112}
113
114// NormalizeAndAbsolute normalizes the path and makes it absolute.
115func NormalizeAndAbsolute(path string) (string, error) {

Callers 15

newBucketFunction · 0.92
newLockerFunction · 0.92
GetArchiveMethod · 0.92
ExistsFunction · 0.92
nestedOutputDirsFunction · 0.92
applyRootsToTargetPathFunction · 0.92
newWorkspaceBucketConfigFunction · 0.92
TestGetParsedRefSuccessFunction · 0.92
getGitSchemeAndPathFunction · 0.92
newReadWriteBucketFunction · 0.92

Calls

no outgoing calls

Tested by 3

TestGetParsedRefSuccessFunction · 0.74
TestNormalizeFunction · 0.68
TestNormalizeFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…