Commit 49680548 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

command/fix: add synopsis option to fixers

This will be used in help output and such later
parent 0f61db53
......@@ -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"`
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment