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

Function IsValidModuleFilePath

private/bufpkg/bufmodule/file_type.go:102–105  ·  view source on GitHub ↗

IsValidModuleFilePath returns true if the given file path is a valid Module file path. This will be true if the file path represents a .proto file, license file, or documentation file. Note that license and documentation files must be at the root, and cannot be in subdirectories. That is, subdir/L

(filePath string)

Source from the content-addressed store, hash-verified

100// Note that license and documentation files must be at the root, and cannot be in subdirectories. That is,
101// subdir/LICENSE is not a valid module file (including on push), but LICENSE is.
102func IsValidModuleFilePath(filePath string) bool {
103 _, err := FileTypeForPath(filePath)
104 return err == nil
105}

Callers

nothing calls this directly

Calls 1

FileTypeForPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…