Clarify collection contracts and migration docs
This commit is contained in:
@@ -13,9 +13,10 @@ import (
|
||||
)
|
||||
|
||||
// CollectionInput mounts source at the selected collection's configuration
|
||||
// destination and enables ConfigKit imports for that input. The source is not
|
||||
// read or validated until ConfigKit loads it. Callers may adjust the returned
|
||||
// input, including its filesystem context or imports setting.
|
||||
// destination, collections/<namespace>, and enables ConfigKit imports for that
|
||||
// input. An invalid namespace returns an error matching ErrInvalidConfig. The
|
||||
// source is not read or validated until ConfigKit loads it. Callers may adjust
|
||||
// the returned input, including its filesystem context or imports setting.
|
||||
func CollectionInput(namespace string, source configkit.Source) (configkit.Input, error) {
|
||||
if !domain.IsValidResourceNamespace(namespace) {
|
||||
return configkit.Input{}, fmt.Errorf("%w: invalid collection namespace %q", ErrInvalidConfig, namespace)
|
||||
|
||||
Reference in New Issue
Block a user