mirror of
https://github.com/foomo/sesamy-cli.git
synced 2025-10-16 12:35:36 +00:00
fix: empty load
This commit is contained in:
parent
90c63fa159
commit
02c118c3c5
@ -11,12 +11,16 @@ import (
|
||||
)
|
||||
|
||||
func LoadEventParams(ctx context.Context, cfg contemplate.Config) (map[string]map[string]string, error) {
|
||||
ret := map[string]map[string]string{}
|
||||
if len(cfg.Packages) == 0 {
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
parser, err := contemplate.Load(ctx, &cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ret := map[string]map[string]string{}
|
||||
for _, cfgPkg := range cfg.Packages {
|
||||
pkg := parser.Package(cfgPkg.Path)
|
||||
for _, typ := range cfgPkg.Types {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user