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

Function parseSubDirPath

private/buf/buffetch/internal/ref_parser.go:403–412  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

401}
402
403func parseSubDirPath(value string) (string, error) {
404 subDirPath, err := normalpath.NormalizeAndValidate(value)
405 if err != nil {
406 return "", err
407 }
408 if subDirPath == "." {
409 return "", nil
410 }
411 return subDirPath, nil
412}
413
414// getRawPathAndOptions returns the raw path and options from the value provided,
415// the rawPath will be non-empty when returning without error here.

Callers 2

getRawRefMethod · 0.85

Calls 1

NormalizeAndValidateFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…