ParseModuleVisibility parses the ModuleVisibility from the string.
(s string)
| 32 | |
| 33 | // ParseModuleVisibility parses the ModuleVisibility from the string. |
| 34 | func 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 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…