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

Function ParseFormat

private/bufpkg/bufanalysis/bufanalysis.go:105–115  ·  view source on GitHub ↗

ParseFormat parses the Format. The empty strings defaults to FormatText.

(s string)

Source from the content-addressed store, hash-verified

103//
104// The empty strings defaults to FormatText.
105func ParseFormat(s string) (Format, error) {
106 s = strings.ToLower(strings.TrimSpace(s))
107 if s == "" {
108 return FormatText, nil
109 }
110 f, ok := stringToFormat[s]
111 if ok {
112 return f, nil
113 }
114 return 0, fmt.Errorf("unknown format: %q", s)
115}
116
117// FileInfo is a minimal FileInfo interface.
118type FileInfo interface {

Callers 1

PrintFileAnnotationSetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…