Use manifest package name in generated code.

This commit is contained in:
John Beisley 2022-06-06 18:03:17 +01:00
parent 89dd64b3ce
commit 5a32790ea4
2 changed files with 7 additions and 5 deletions

View File

@ -140,6 +140,7 @@ func processService(
}
err = tmpl.ExecuteTemplate(os.Stdout, "service", tmplArgs{
Manifest: srvManifest,
Imps: imps,
SCPD: sd,
})
@ -169,6 +170,7 @@ type ServiceManifest struct {
}
type tmplArgs struct {
Manifest *ServiceManifest
Imps *imports
SCPD *srvdesc.SCPD
}

View File

@ -1,6 +1,6 @@
{{define "service"}}
{{- $Imps := .Imps}}
package TODO
package {{.Manifest.Package}}
import (
{{- range .Imps.ImportLines}}