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

Function Join

private/pkg/normalpath/normalpath.go:171–181  ·  view source on GitHub ↗

Join is equivalent to filepath.Join. Empty strings are ignored, Can return empty string. Normalizes before returning otherwise.

(paths ...string)

Source from the content-addressed store, hash-verified

169//
170// Normalizes before returning otherwise.
171func Join(paths ...string) string {
172 unnormalized := make([]string, len(paths))
173 for i, path := range paths {
174 unnormalized[i] = Unnormalize(path)
175 }
176 value := filepath.Join(unnormalized...)
177 if value == "" {
178 return ""
179 }
180 return Normalize(value)
181}
182
183// Rel is equivalent to filepath.Rel.
184//

Callers 15

chdirToSubDirFunction · 0.92
TestRunLint1Function · 0.92
TestRunLint2Function · 0.92
TestRunLint3Function · 0.92
TestRunLint4Function · 0.92
TestRunLint5Function · 0.92
TestRunLint6Function · 0.92
TestRunLint7Function · 0.92
TestRunLint8Function · 0.92

Calls 2

UnnormalizeFunction · 0.85
NormalizeFunction · 0.85

Tested by 15

chdirToSubDirFunction · 0.74
TestRunLint1Function · 0.74
TestRunLint2Function · 0.74
TestRunLint3Function · 0.74
TestRunLint4Function · 0.74
TestRunLint5Function · 0.74
TestRunLint6Function · 0.74
TestRunLint7Function · 0.74
TestRunLint8Function · 0.74
testNewReadBucketFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…