command/fix: add synopsis option to fixers
This will be used in help output and such later
This commit is contained in:
parent
0f61db53e4
commit
49680548f4
|
@ -6,6 +6,10 @@ type Fixer interface {
|
|||
// in some way, and returns the new, transformed structure. The
|
||||
// Fix method is allowed to mutate the input.
|
||||
Fix(input map[string]interface{}) (map[string]interface{}, error)
|
||||
|
||||
// Synopsis returns a string description of what the fixer actually
|
||||
// does.
|
||||
Synopsis() string
|
||||
}
|
||||
|
||||
// Fixers is the map of all available fixers, by name.
|
||||
|
|
|
@ -49,3 +49,7 @@ func (FixerCreateTime) Fix(input map[string]interface{}) (map[string]interface{}
|
|||
input["builders"] = tpl.Builders
|
||||
return input, nil
|
||||
}
|
||||
|
||||
func (FixerCreateTime) Synopsis() string {
|
||||
return `Replaces ".CreateTime" in builder configs with "{{timestamp}}"`
|
||||
}
|
||||
|
|
|
@ -41,3 +41,7 @@ func (FixerISOMD5) Fix(input map[string]interface{}) (map[string]interface{}, er
|
|||
input["builders"] = tpl.Builders
|
||||
return input, nil
|
||||
}
|
||||
|
||||
func (FixerISOMD5) Synopsis() string {
|
||||
return `Replaces "iso_md5" in builders with "iso_checksum"`
|
||||
}
|
||||
|
|
|
@ -57,3 +57,7 @@ func (FixerVirtualBoxGAAttach) Fix(input map[string]interface{}) (map[string]int
|
|||
input["builders"] = tpl.Builders
|
||||
return input, nil
|
||||
}
|
||||
|
||||
func (FixerVirtualBoxGAAttach) Synopsis() string {
|
||||
return `Updates VirtualBox builders using "guest_additions_attach" to use "guest_additions_mode"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue