Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
49680548
Commit
49680548
authored
Nov 02, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command/fix: add synopsis option to fixers
This will be used in help output and such later
parent
0f61db53
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
command/fix/fixer.go
command/fix/fixer.go
+4
-0
command/fix/fixer_createtime.go
command/fix/fixer_createtime.go
+4
-0
command/fix/fixer_iso_md5.go
command/fix/fixer_iso_md5.go
+4
-0
command/fix/fixer_virtualbox_gaattach.go
command/fix/fixer_virtualbox_gaattach.go
+4
-0
No files found.
command/fix/fixer.go
View file @
49680548
...
...
@@ -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.
...
...
command/fix/fixer_createtime.go
View file @
49680548
...
...
@@ -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}}"`
}
command/fix/fixer_iso_md5.go
View file @
49680548
...
...
@@ -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"`
}
command/fix/fixer_virtualbox_gaattach.go
View file @
49680548
...
...
@@ -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"`
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment