Use manifest package name in generated code.
This commit is contained in:
parent
89dd64b3ce
commit
5a32790ea4
@ -140,8 +140,9 @@ func processService(
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = tmpl.ExecuteTemplate(os.Stdout, "service", tmplArgs{
|
err = tmpl.ExecuteTemplate(os.Stdout, "service", tmplArgs{
|
||||||
Imps: imps,
|
Manifest: srvManifest,
|
||||||
SCPD: sd,
|
Imps: imps,
|
||||||
|
SCPD: sd,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("executing srv_template: %w", err)
|
return fmt.Errorf("executing srv_template: %w", err)
|
||||||
@ -169,8 +170,9 @@ type ServiceManifest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type tmplArgs struct {
|
type tmplArgs struct {
|
||||||
Imps *imports
|
Manifest *ServiceManifest
|
||||||
SCPD *srvdesc.SCPD
|
Imps *imports
|
||||||
|
SCPD *srvdesc.SCPD
|
||||||
}
|
}
|
||||||
|
|
||||||
type imports struct {
|
type imports struct {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{define "service"}}
|
{{define "service"}}
|
||||||
{{- $Imps := .Imps}}
|
{{- $Imps := .Imps}}
|
||||||
package TODO
|
package {{.Manifest.Package}}
|
||||||
|
|
||||||
import (
|
import (
|
||||||
{{- range .Imps.ImportLines}}
|
{{- range .Imps.ImportLines}}
|
||||||
|
Loading…
Reference in New Issue
Block a user