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
0edd8313
Commit
0edd8313
authored
Jul 27, 2018
by
stewart-yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update godep for for move util/pointer to k8s.io/utils
parent
649b46ff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
102 deletions
+13
-102
Godeps.json
Godeps/Godeps.json
+7
-3
LICENSES
Godeps/LICENSES
+0
-0
BUILD
pkg/util/pointer/BUILD
+0
-32
pointer_test.go
pkg/util/pointer/pointer_test.go
+0
-66
pointer.go
vendor/k8s.io/utils/pointer/pointer.go
+6
-1
No files found.
Godeps/Godeps.json
View file @
0edd8313
...
@@ -3372,15 +3372,19 @@
...
@@ -3372,15 +3372,19 @@
},
},
{
{
"ImportPath"
:
"k8s.io/utils/clock"
,
"ImportPath"
:
"k8s.io/utils/clock"
,
"Rev"
:
"
258e2a2fa64568210fbd6267cf1d8fd87c3cb86e
"
"Rev"
:
"
66066c83e385e385ccc3c964b44fd7dcd413d0ed
"
},
},
{
{
"ImportPath"
:
"k8s.io/utils/exec"
,
"ImportPath"
:
"k8s.io/utils/exec"
,
"Rev"
:
"
258e2a2fa64568210fbd6267cf1d8fd87c3cb86e
"
"Rev"
:
"
66066c83e385e385ccc3c964b44fd7dcd413d0ed
"
},
},
{
{
"ImportPath"
:
"k8s.io/utils/exec/testing"
,
"ImportPath"
:
"k8s.io/utils/exec/testing"
,
"Rev"
:
"258e2a2fa64568210fbd6267cf1d8fd87c3cb86e"
"Rev"
:
"66066c83e385e385ccc3c964b44fd7dcd413d0ed"
},
{
"ImportPath"
:
"k8s.io/utils/pointer"
,
"Rev"
:
"66066c83e385e385ccc3c964b44fd7dcd413d0ed"
},
},
{
{
"ImportPath"
:
"vbom.ml/util/sortorder"
,
"ImportPath"
:
"vbom.ml/util/sortorder"
,
...
...
Godeps/LICENSES
View file @
0edd8313
This diff is collapsed.
Click to expand it.
pkg/util/pointer/BUILD
deleted
100644 → 0
View file @
649b46ff
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
"go_test",
)
go_test(
name = "go_default_test",
srcs = ["pointer_test.go"],
embed = [":go_default_library"],
)
go_library(
name = "go_default_library",
srcs = ["pointer.go"],
importpath = "k8s.io/kubernetes/pkg/util/pointer",
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
pkg/util/pointer/pointer_test.go
deleted
100644 → 0
View file @
649b46ff
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
pointer
import
(
"testing"
)
func
TestAllPtrFieldsNil
(
t
*
testing
.
T
)
{
testCases
:=
[]
struct
{
obj
interface
{}
expected
bool
}{
{
struct
{}{},
true
},
{
struct
{
Foo
int
}{
12345
},
true
},
{
&
struct
{
Foo
int
}{
12345
},
true
},
{
struct
{
Foo
*
int
}{
nil
},
true
},
{
&
struct
{
Foo
*
int
}{
nil
},
true
},
{
struct
{
Foo
int
Bar
*
int
}{
12345
,
nil
},
true
},
{
&
struct
{
Foo
int
Bar
*
int
}{
12345
,
nil
},
true
},
{
struct
{
Foo
*
int
Bar
*
int
}{
nil
,
nil
},
true
},
{
&
struct
{
Foo
*
int
Bar
*
int
}{
nil
,
nil
},
true
},
{
struct
{
Foo
*
int
}{
new
(
int
)},
false
},
{
&
struct
{
Foo
*
int
}{
new
(
int
)},
false
},
{
struct
{
Foo
*
int
Bar
*
int
}{
nil
,
new
(
int
)},
false
},
{
&
struct
{
Foo
*
int
Bar
*
int
}{
nil
,
new
(
int
)},
false
},
{(
*
struct
{})(
nil
),
true
},
}
for
i
,
tc
:=
range
testCases
{
if
AllPtrFieldsNil
(
tc
.
obj
)
!=
tc
.
expected
{
t
.
Errorf
(
"case[%d]: expected %t, got %t"
,
i
,
tc
.
expected
,
!
tc
.
expected
)
}
}
}
pkg/util
/pointer/pointer.go
→
vendor/k8s.io/utils
/pointer/pointer.go
View file @
0edd8313
/*
/*
Copyright 201
7
The Kubernetes Authors.
Copyright 201
8
The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
...
@@ -69,3 +69,8 @@ func Int32PtrDerefOr(ptr *int32, def int32) int32 {
...
@@ -69,3 +69,8 @@ func Int32PtrDerefOr(ptr *int32, def int32) int32 {
func
BoolPtr
(
b
bool
)
*
bool
{
func
BoolPtr
(
b
bool
)
*
bool
{
return
&
b
return
&
b
}
}
// StringPtr returns a pointer to the passed string.
func
StringPtr
(
s
string
)
*
string
{
return
&
s
}
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