Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
f52ea81f
Commit
f52ea81f
authored
Feb 06, 2016
by
jackgr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace cross package panic with error return.
parent
92710a33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
registryprovider.go
registry/registryprovider.go
+3
-1
No files found.
registry/registryprovider.go
View file @
f52ea81f
...
...
@@ -168,6 +168,7 @@ type githubRegistryProvider struct {
// NewGithubRegistryProvider creates a GithubRegistryProvider.
func
NewGithubRegistryProvider
(
cp
common
.
CredentialProvider
)
GithubRegistryProvider
{
if
cp
==
nil
{
// TODO: replace this panic with an error return.
panic
(
fmt
.
Errorf
(
"no credential provider"
))
}
return
&
githubRegistryProvider
{
cp
:
cp
}
...
...
@@ -239,6 +240,7 @@ type gcsRegistryProvider struct {
// NewGCSRegistryProvider creates a GCSRegistryProvider.
func
NewGCSRegistryProvider
(
cp
common
.
CredentialProvider
)
GCSRegistryProvider
{
if
cp
==
nil
{
// TODO: replace this panic with an error return.
panic
(
fmt
.
Errorf
(
"no credential provider"
))
}
return
&
gcsRegistryProvider
{
cp
:
cp
}
...
...
@@ -350,7 +352,7 @@ func ShortTypeToDownloadURLs(rp RegistryProvider, t string) ([]string, Registry,
}
if
r
==
nil
{
panic
(
fmt
.
Errorf
(
"cannot get github registry for %s"
,
t
)
)
return
nil
,
nil
,
fmt
.
Errorf
(
"cannot get github registry for %s"
,
t
)
}
tt
,
err
:=
NewType
(
m
[
3
],
m
[
4
],
m
[
5
])
...
...
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