loadScopesConfig reads the scopes map from .taskmd.yaml configuration.
()
| 43 | |
| 44 | // loadScopesConfig reads the scopes map from .taskmd.yaml configuration. |
| 45 | func loadScopesConfig() map[string]bool { |
| 46 | raw := viper.Get("scopes") |
| 47 | if raw == nil { |
| 48 | return nil |
| 49 | } |
| 50 | |
| 51 | scopeMap, ok := raw.(map[string]any) |
| 52 | if !ok { |
| 53 | return nil |
| 54 | } |
| 55 | |
| 56 | known := make(map[string]bool, len(scopeMap)) |
| 57 | for name := range scopeMap { |
| 58 | known[name] = true |
| 59 | } |
| 60 | return known |
| 61 | } |
no outgoing calls
no test coverage detected