Apply namespace scopes to inspections and diagnostics
This commit is contained in:
@@ -14,12 +14,14 @@ type Namespaces struct {
|
||||
Backend string
|
||||
}
|
||||
|
||||
// WithNamespaces returns an engine view that qualifies slashless prompt and
|
||||
// profile selections with the supplied namespaces. Qualified selections pass
|
||||
// through unchanged. It replaces all namespace defaults on the new view and
|
||||
// leaves the receiver unchanged; resource existence is checked when selected.
|
||||
// An empty field clears that resource's scope. Invalid namespace syntax or a
|
||||
// nil engine returns an error matching ErrInvalidConfig.
|
||||
// WithNamespaces returns an engine view that qualifies slashless caller-supplied
|
||||
// prompt, profile, and backend selections with the supplied namespaces.
|
||||
// Qualified selections pass through unchanged. It replaces all namespace
|
||||
// defaults on the new view and leaves the receiver unchanged; resource
|
||||
// existence is checked when selected. An empty field clears that resource's
|
||||
// scope. Captured configuration references, defaults, and global configuration
|
||||
// inspection are not rewritten. Invalid namespace syntax or a nil engine
|
||||
// returns an error matching ErrInvalidConfig.
|
||||
func (e *Engine) WithNamespaces(namespaces Namespaces) (*Engine, error) {
|
||||
if e == nil || e.internal == nil {
|
||||
return nil, fmt.Errorf("%w: engine is nil", ErrInvalidConfig)
|
||||
|
||||
Reference in New Issue
Block a user