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
44008c32
Commit
44008c32
authored
May 27, 2015
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2121 from josharian/no-scrub-empty
common: two minor fixes
parents
4413e60b
2fe785ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
common/config.go
common/config.go
+3
-8
No files found.
common/config.go
View file @
44008c32
...
...
@@ -14,6 +14,9 @@ import (
func
ScrubConfig
(
target
interface
{},
values
...
string
)
string
{
conf
:=
fmt
.
Sprintf
(
"Config: %+v"
,
target
)
for
_
,
value
:=
range
values
{
if
value
==
""
{
continue
}
conf
=
strings
.
Replace
(
conf
,
value
,
"<Filtered>"
,
-
1
)
}
return
conf
...
...
@@ -96,14 +99,6 @@ func DownloadableURL(original string) (string, error) {
// Make sure it is lowercased
url
.
Scheme
=
strings
.
ToLower
(
url
.
Scheme
)
// This is to work around issue #5927. This can safely be removed once
// we distribute with a version of Go that fixes that bug.
//
// See: https://code.google.com/p/go/issues/detail?id=5927
if
url
.
Path
!=
""
&&
url
.
Path
[
0
]
!=
'/'
{
url
.
Path
=
"/"
+
url
.
Path
}
// Verify that the scheme is something we support in our common downloader.
supported
:=
[]
string
{
"file"
,
"http"
,
"https"
}
found
:=
false
...
...
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