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
4fea1687
Commit
4fea1687
authored
Mar 15, 2018
by
hangaoshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary TODOs in meta.go
parent
34001d8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
meta.go
staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go
+0
-3
No files found.
staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go
View file @
4fea1687
...
@@ -38,7 +38,6 @@ var errNotCommon = fmt.Errorf("object does not implement the common interface fo
...
@@ -38,7 +38,6 @@ var errNotCommon = fmt.Errorf("object does not implement the common interface fo
// CommonAccessor returns a Common interface for the provided object or an error if the object does
// CommonAccessor returns a Common interface for the provided object or an error if the object does
// not provide List.
// not provide List.
// TODO: return bool instead of error
func
CommonAccessor
(
obj
interface
{})
(
metav1
.
Common
,
error
)
{
func
CommonAccessor
(
obj
interface
{})
(
metav1
.
Common
,
error
)
{
switch
t
:=
obj
.
(
type
)
{
switch
t
:=
obj
.
(
type
)
{
case
List
:
case
List
:
...
@@ -71,7 +70,6 @@ func CommonAccessor(obj interface{}) (metav1.Common, error) {
...
@@ -71,7 +70,6 @@ func CommonAccessor(obj interface{}) (metav1.Common, error) {
// not provide List.
// not provide List.
// IMPORTANT: Objects are NOT a superset of lists. Do not use this check to determine whether an
// IMPORTANT: Objects are NOT a superset of lists. Do not use this check to determine whether an
// object *is* a List.
// object *is* a List.
// TODO: return bool instead of error
func
ListAccessor
(
obj
interface
{})
(
List
,
error
)
{
func
ListAccessor
(
obj
interface
{})
(
List
,
error
)
{
switch
t
:=
obj
.
(
type
)
{
switch
t
:=
obj
.
(
type
)
{
case
List
:
case
List
:
...
@@ -101,7 +99,6 @@ var errNotObject = fmt.Errorf("object does not implement the Object interfaces")
...
@@ -101,7 +99,6 @@ var errNotObject = fmt.Errorf("object does not implement the Object interfaces")
// obj must be a pointer to an API type. An error is returned if the minimum
// obj must be a pointer to an API type. An error is returned if the minimum
// required fields are missing. Fields that are not required return the default
// required fields are missing. Fields that are not required return the default
// value and are a no-op if set.
// value and are a no-op if set.
// TODO: return bool instead of error
func
Accessor
(
obj
interface
{})
(
metav1
.
Object
,
error
)
{
func
Accessor
(
obj
interface
{})
(
metav1
.
Object
,
error
)
{
switch
t
:=
obj
.
(
type
)
{
switch
t
:=
obj
.
(
type
)
{
case
metav1
.
Object
:
case
metav1
.
Object
:
...
...
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