diff --git a/v2alpha/cmd/goupnp2srvgen/main.go b/v2alpha/cmd/goupnp2srvgen/main.go index fbf1341..bd1adc0 100644 --- a/v2alpha/cmd/goupnp2srvgen/main.go +++ b/v2alpha/cmd/goupnp2srvgen/main.go @@ -140,8 +140,9 @@ func processService( } err = tmpl.ExecuteTemplate(os.Stdout, "service", tmplArgs{ - Imps: imps, - SCPD: sd, + Manifest: srvManifest, + Imps: imps, + SCPD: sd, }) if err != nil { return fmt.Errorf("executing srv_template: %w", err) @@ -169,8 +170,9 @@ type ServiceManifest struct { } type tmplArgs struct { - Imps *imports - SCPD *srvdesc.SCPD + Manifest *ServiceManifest + Imps *imports + SCPD *srvdesc.SCPD } type imports struct { diff --git a/v2alpha/srv/srv.gotemplate b/v2alpha/srv/srv.gotemplate index e8dc16e..16333d9 100644 --- a/v2alpha/srv/srv.gotemplate +++ b/v2alpha/srv/srv.gotemplate @@ -1,6 +1,6 @@ {{define "service"}} {{- $Imps := .Imps}} -package TODO +package {{.Manifest.Package}} import ( {{- range .Imps.ImportLines}}