File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ type FileConfig struct {
58
58
} `yaml:"proxy"`
59
59
HTTP * Config `yaml:"http"`
60
60
Workers map [string ]* Worker `yaml:"workers"`
61
+
62
+ filename string
61
63
}
62
64
63
65
type Worker struct {
@@ -141,7 +143,9 @@ func newConfigFromFile(configFile string) (*FileConfig, error) {
141
143
return nil , err
142
144
}
143
145
144
- var fileConfig FileConfig
146
+ fileConfig := FileConfig {
147
+ filename : filepath .Base (configFile ),
148
+ }
145
149
if err := yaml .Unmarshal (contents , & fileConfig ); err != nil {
146
150
return nil , err
147
151
}
@@ -184,7 +188,7 @@ func (c *FileConfig) parseWorkers() error {
184
188
185
189
for k , v := range c .Workers {
186
190
if v == nil {
187
- return errors .Errorf (" The \ " %s\ " worker entry in \" .symfony.local.yaml \ " cannot be empty." , k )
191
+ return errors .Errorf (` The "%s" worker entry in ".%s " cannot be empty.` , k , c . filename )
188
192
}
189
193
}
190
194
You can’t perform that action at this time.
0 commit comments