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
04d8ae4e
Commit
04d8ae4e
authored
Feb 11, 2016
by
vaikas-google
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #229 from jackgr/master
Replace cross package panic with error return.
parents
92710a33
f52ea81f
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 @
04d8ae4e
...
@@ -168,6 +168,7 @@ type githubRegistryProvider struct {
...
@@ -168,6 +168,7 @@ type githubRegistryProvider struct {
// NewGithubRegistryProvider creates a GithubRegistryProvider.
// NewGithubRegistryProvider creates a GithubRegistryProvider.
func
NewGithubRegistryProvider
(
cp
common
.
CredentialProvider
)
GithubRegistryProvider
{
func
NewGithubRegistryProvider
(
cp
common
.
CredentialProvider
)
GithubRegistryProvider
{
if
cp
==
nil
{
if
cp
==
nil
{
// TODO: replace this panic with an error return.
panic
(
fmt
.
Errorf
(
"no credential provider"
))
panic
(
fmt
.
Errorf
(
"no credential provider"
))
}
}
return
&
githubRegistryProvider
{
cp
:
cp
}
return
&
githubRegistryProvider
{
cp
:
cp
}
...
@@ -239,6 +240,7 @@ type gcsRegistryProvider struct {
...
@@ -239,6 +240,7 @@ type gcsRegistryProvider struct {
// NewGCSRegistryProvider creates a GCSRegistryProvider.
// NewGCSRegistryProvider creates a GCSRegistryProvider.
func
NewGCSRegistryProvider
(
cp
common
.
CredentialProvider
)
GCSRegistryProvider
{
func
NewGCSRegistryProvider
(
cp
common
.
CredentialProvider
)
GCSRegistryProvider
{
if
cp
==
nil
{
if
cp
==
nil
{
// TODO: replace this panic with an error return.
panic
(
fmt
.
Errorf
(
"no credential provider"
))
panic
(
fmt
.
Errorf
(
"no credential provider"
))
}
}
return
&
gcsRegistryProvider
{
cp
:
cp
}
return
&
gcsRegistryProvider
{
cp
:
cp
}
...
@@ -350,7 +352,7 @@ func ShortTypeToDownloadURLs(rp RegistryProvider, t string) ([]string, Registry,
...
@@ -350,7 +352,7 @@ func ShortTypeToDownloadURLs(rp RegistryProvider, t string) ([]string, Registry,
}
}
if
r
==
nil
{
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
])
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