Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
9c2202a7
Commit
9c2202a7
authored
Sep 19, 2015
by
Chao Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve the panic message of GroupOrDie
parent
c2f76e4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
latest.go
pkg/api/latest/latest.go
+6
-1
No files found.
pkg/api/latest/latest.go
View file @
9c2202a7
...
@@ -66,7 +66,12 @@ func (g GroupMetaMap) Group(group string) (*GroupMeta, error) {
...
@@ -66,7 +66,12 @@ func (g GroupMetaMap) Group(group string) (*GroupMeta, error) {
func
(
g
GroupMetaMap
)
GroupOrDie
(
group
string
)
*
GroupMeta
{
func
(
g
GroupMetaMap
)
GroupOrDie
(
group
string
)
*
GroupMeta
{
groupMeta
,
found
:=
g
[
group
]
groupMeta
,
found
:=
g
[
group
]
if
!
found
{
if
!
found
{
panic
(
fmt
.
Sprintf
(
"no version is registered for group %v"
,
group
))
const
msg
=
"Please check the KUBE_API_VERSIONS environment variable."
if
group
==
""
{
panic
(
"The legacy v1 API is not registered. "
+
msg
)
}
else
{
panic
(
fmt
.
Sprintf
(
"No version is registered for group %s. "
,
group
)
+
msg
)
}
}
}
return
groupMeta
return
groupMeta
}
}
...
...
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