A Fixer is something that can perform a fix operation on a template.
| 5 | |
| 6 | // A Fixer is something that can perform a fix operation on a template. |
| 7 | type Fixer interface { |
| 8 | // DeprecatedOptions returns the name(s) of the option(s) being replaced in |
| 9 | // this fixer. It is used to generate a list of deprecated options that the |
| 10 | // template parser checks against to warn users that they need to call |
| 11 | // `packer fix` against their templates after upgrading. |
| 12 | DeprecatedOptions() map[string][]string |
| 13 | |
| 14 | // Fix takes a raw map structure input, potentially transforms it |
| 15 | // in some way, and returns the new, transformed structure. The |
| 16 | // Fix method is allowed to mutate the input. |
| 17 | Fix(input map[string]interface{}) (map[string]interface{}, error) |
| 18 | |
| 19 | // Synopsis returns a string description of what the fixer actually |
| 20 | // does. |
| 21 | Synopsis() string |
| 22 | } |
| 23 | |
| 24 | // Fixers is the map of all available fixers, by name. |
| 25 | var Fixers map[string]Fixer |
no outgoing calls
no test coverage detected
searching dependent graphs…