Combine DSLs when defining services
over multiple files
@@ -58,6 +58,11 @@ func Service(name string, fn func()) *expr.ServiceExpr {
return nil
}
if s := expr.Root.Service(name); s != nil {
+ oldDSL := s.DSL()
+ s.DSLFunc = func() {
+ oldDSL()
+ fn()
+ }
return s
}
s := &expr.ServiceExpr{Name: name, DSLFunc: fn}
