fix error message (#5922)

'all' is a synonym for 'all_others'
This commit is contained in:
Alessandro Ros
2026-07-05 11:00:09 +02:00
committed by GitHub
parent 99f804d733
commit e98b727277
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -767,7 +767,7 @@ func (pconf *Path) validate(
}
} else {
if pconf.Source != "publisher" && pconf.Source != "redirect" && pconf.Regexp != nil {
return fmt.Errorf("a path with a regular expression (or path 'all') and a static source" +
return fmt.Errorf("a path with a regular expression (or path 'all_others') and a static source" +
" must have 'sourceOnDemand' set to true")
}
}
@@ -791,7 +791,7 @@ func (pconf *Path) validate(
if pconf.AlwaysAvailable {
if pconf.Regexp != nil {
return fmt.Errorf("'alwaysAvailable' cannot be used in a path with a regular expression (or path 'all')")
return fmt.Errorf("'alwaysAvailable' cannot be used in a path with a regular expression (or path 'all_others')")
}
if pconf.SourceOnDemand {
@@ -923,7 +923,7 @@ func (pconf *Path) validate(
// Hooks
if pconf.RunOnInit != "" && pconf.Regexp != nil {
return fmt.Errorf("a path with a regular expression (or path 'all')" +
return fmt.Errorf("a path with a regular expression (or path 'all_others')" +
" does not support option 'runOnInit'; use another path")
}
+1 -1
View File
@@ -908,7 +908,7 @@ func TestPathResolveSource(t *testing.T) {
" '~^test_(.+)$':\n"+
" source: rtsp://127.0.0.1:8555/$G1?$MTX_QUERY\n"+
" sourceOnDemand: yes\n"+
" 'all':\n")
" 'all_others':\n")
require.Equal(t, true, ok)
defer p.Close()