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

Function ParseModuleVisibility

private/bufpkg/bufmodule/module_visibility.go:34–43  ·  view source on GitHub ↗

ParseModuleVisibility parses the ModuleVisibility from the string.

(s string)

Source from the content-addressed store, hash-verified

32
33// ParseModuleVisibility parses the ModuleVisibility from the string.
34func ParseModuleVisibility(s string) (ModuleVisibility, error) {
35 switch s {
36 case "public":
37 return ModuleVisibilityPublic, nil
38 case "private":
39 return ModuleVisibilityPrivate, nil
40 default:
41 return 0, fmt.Errorf("unknown ModuleVisibility: %q", s)
42 }
43}

Callers 3

runFunction · 0.92
validateCreateFlagsFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…