target: use constants for target names, instead of string literals

This commit is contained in:
Tomas Hozza 2022-06-01 15:20:30 +02:00 committed by Tom Gundersen
parent f6fa5ccca1
commit c63bfe6d83
16 changed files with 95 additions and 72 deletions

View file

@ -1,5 +1,7 @@
package target
const TargetNameVMWare TargetName = "org.osbuild.vmware"
type VMWareTargetOptions struct {
Filename string `json:"filename"`
Host string `json:"host"`
@ -13,5 +15,5 @@ type VMWareTargetOptions struct {
func (VMWareTargetOptions) isTargetOptions() {}
func NewVMWareTarget(options *VMWareTargetOptions) *Target {
return newTarget("org.osbuild.vmware", options)
return newTarget(TargetNameVMWare, options)
}