v0.30.1 configuration engine as wasm
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s

This commit is contained in:
lixen committed 2026-10-09 23:36:27 -04:00
1 parent 883af0fcaa
commit bfcc15613a
13 files changed
+320 -52

No files matched your search

+1 -1
View File
@@ -133,7 +133,7 @@ const (
type FilterConfig struct {
Type FilterType `toml:"type" default:"include" lw:"enum=include|exclude" help:"pass only matching entries, or drop them"`
Logic FilterLogic `toml:"logic" default:"or" lw:"enum=or|and" help:"match any pattern, or all"`
Patterns []string `toml:"patterns" lw:"hint=regex" help:"RE2 patterns"`
Patterns []string `toml:"patterns,omitempty" lw:"hint=regex" help:"RE2 patterns"`
}
// --- Sources ---
+4 -4
View File
@@ -90,7 +90,7 @@ func ValidatePipelines(pipelines []PipelineConfig) error {
single[role+typ] = p.Name
}
if _, err := decode(role, typ, m); err != nil {
return at(path+".config", err)
return At(path+".config", err)
}
return nil
}
@@ -130,14 +130,14 @@ func checkFlow(f *FlowConfig, path string) error {
}
for _, key := range slices.Sorted(maps.Keys(stages)) {
if err := Settle(stages[key]); err != nil {
return at(path+"."+key, err)
return At(path+"."+key, err)
}
}
return nil
}
// at prefixes err with the path of the table it was found in
func at(path string, err error) error {
// At prefixes err with the path of the table it was found in
func At(path string, err error) error {
if ke, ok := errors.AsType[*KeyError](err); ok {
return fmt.Errorf("%s.%s: %w", path, ke.Key, ke.Err)
}