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
729f5a3b
Commit
729f5a3b
authored
Nov 09, 2017
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bump(k8s.io/gengo): b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
parent
1a4a019e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
72 deletions
+16
-72
Godeps.json
Godeps/Godeps.json
+10
-13
deepcopy.go
...k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go
+1
-54
sets.go
vendor/k8s.io/gengo/examples/set-gen/generators/sets.go
+1
-1
byte.go
vendor/k8s.io/gengo/examples/set-gen/sets/byte.go
+1
-1
int.go
vendor/k8s.io/gengo/examples/set-gen/sets/int.go
+1
-1
int64.go
vendor/k8s.io/gengo/examples/set-gen/sets/int64.go
+1
-1
string.go
vendor/k8s.io/gengo/examples/set-gen/sets/string.go
+1
-1
No files found.
Godeps/Godeps.json
View file @
729f5a3b
...
@@ -1834,7 +1834,6 @@
...
@@ -1834,7 +1834,6 @@
},
},
{
{
"ImportPath"
:
"github.com/inconshreveable/mousetrap"
,
"ImportPath"
:
"github.com/inconshreveable/mousetrap"
,
"Comment"
:
"v1.0"
,
"Rev"
:
"76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
"Rev"
:
"76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
},
},
{
{
...
@@ -2313,7 +2312,6 @@
...
@@ -2313,7 +2312,6 @@
},
},
{
{
"ImportPath"
:
"github.com/pelletier/go-buffruneio"
,
"ImportPath"
:
"github.com/pelletier/go-buffruneio"
,
"Comment"
:
"v0.1.0"
,
"Rev"
:
"df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d"
"Rev"
:
"df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d"
},
},
{
{
...
@@ -2632,7 +2630,6 @@
...
@@ -2632,7 +2630,6 @@
},
},
{
{
"ImportPath"
:
"github.com/xiang90/probing"
,
"ImportPath"
:
"github.com/xiang90/probing"
,
"Comment"
:
"0.0.1"
,
"Rev"
:
"07dd2e8dfe18522e9c447ba95f2fe95262f63bb2"
"Rev"
:
"07dd2e8dfe18522e9c447ba95f2fe95262f63bb2"
},
},
{
{
...
@@ -3007,43 +3004,43 @@
...
@@ -3007,43 +3004,43 @@
},
},
{
{
"ImportPath"
:
"k8s.io/gengo/args"
,
"ImportPath"
:
"k8s.io/gengo/args"
,
"Rev"
:
"
70ad626ed2d7a483d89d2c4c56364d60b48ee8fc
"
"Rev"
:
"
b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
"
},
},
{
{
"ImportPath"
:
"k8s.io/gengo/examples/deepcopy-gen/generators"
,
"ImportPath"
:
"k8s.io/gengo/examples/deepcopy-gen/generators"
,
"Rev"
:
"
70ad626ed2d7a483d89d2c4c56364d60b48ee8fc
"
"Rev"
:
"
b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
"
},
},
{
{
"ImportPath"
:
"k8s.io/gengo/examples/defaulter-gen/generators"
,
"ImportPath"
:
"k8s.io/gengo/examples/defaulter-gen/generators"
,
"Rev"
:
"
70ad626ed2d7a483d89d2c4c56364d60b48ee8fc
"
"Rev"
:
"
b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
"
},
},
{
{
"ImportPath"
:
"k8s.io/gengo/examples/import-boss/generators"
,
"ImportPath"
:
"k8s.io/gengo/examples/import-boss/generators"
,
"Rev"
:
"
70ad626ed2d7a483d89d2c4c56364d60b48ee8fc
"
"Rev"
:
"
b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
"
},
},
{
{
"ImportPath"
:
"k8s.io/gengo/examples/set-gen/generators"
,
"ImportPath"
:
"k8s.io/gengo/examples/set-gen/generators"
,
"Rev"
:
"
70ad626ed2d7a483d89d2c4c56364d60b48ee8fc
"
"Rev"
:
"
b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
"
},
},
{
{
"ImportPath"
:
"k8s.io/gengo/examples/set-gen/sets"
,
"ImportPath"
:
"k8s.io/gengo/examples/set-gen/sets"
,
"Rev"
:
"
70ad626ed2d7a483d89d2c4c56364d60b48ee8fc
"
"Rev"
:
"
b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
"
},
},
{
{
"ImportPath"
:
"k8s.io/gengo/generator"
,
"ImportPath"
:
"k8s.io/gengo/generator"
,
"Rev"
:
"
70ad626ed2d7a483d89d2c4c56364d60b48ee8fc
"
"Rev"
:
"
b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
"
},
},
{
{
"ImportPath"
:
"k8s.io/gengo/namer"
,
"ImportPath"
:
"k8s.io/gengo/namer"
,
"Rev"
:
"
70ad626ed2d7a483d89d2c4c56364d60b48ee8fc
"
"Rev"
:
"
b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
"
},
},
{
{
"ImportPath"
:
"k8s.io/gengo/parser"
,
"ImportPath"
:
"k8s.io/gengo/parser"
,
"Rev"
:
"
70ad626ed2d7a483d89d2c4c56364d60b48ee8fc
"
"Rev"
:
"
b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
"
},
},
{
{
"ImportPath"
:
"k8s.io/gengo/types"
,
"ImportPath"
:
"k8s.io/gengo/types"
,
"Rev"
:
"
70ad626ed2d7a483d89d2c4c56364d60b48ee8fc
"
"Rev"
:
"
b58fc7edb82e0c6ffc9b8aef61813c7261b785d4
"
},
},
{
{
"ImportPath"
:
"k8s.io/heapster/metrics/api/v1/types"
,
"ImportPath"
:
"k8s.io/heapster/metrics/api/v1/types"
,
...
...
vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go
View file @
729f5a3b
...
@@ -369,60 +369,7 @@ func argsFromType(ts ...*types.Type) generator.Args {
...
@@ -369,60 +369,7 @@ func argsFromType(ts ...*types.Type) generator.Args {
}
}
func
(
g
*
genDeepCopy
)
Init
(
c
*
generator
.
Context
,
w
io
.
Writer
)
error
{
func
(
g
*
genDeepCopy
)
Init
(
c
*
generator
.
Context
,
w
io
.
Writer
)
error
{
glog
.
V
(
5
)
.
Infof
(
"Registering types in pkg %q"
,
g
.
targetPackage
)
return
nil
// the legacy restration will go away when the cloner is removed from Kubernetes, replaced
// with static function calls to the DeepCopy methods.
return
g
.
legacyRegistration
(
c
,
w
)
}
func
(
g
*
genDeepCopy
)
legacyRegistration
(
c
*
generator
.
Context
,
w
io
.
Writer
)
error
{
conversionPackagePath
:=
"k8s.io/apimachinery/pkg/conversion"
runtimePackagePath
:=
"k8s.io/apimachinery/pkg/runtime"
cloner
:=
c
.
Universe
.
Type
(
types
.
Name
{
Package
:
conversionPackagePath
,
Name
:
"Cloner"
})
g
.
imports
.
AddType
(
cloner
)
if
!
g
.
registerTypes
{
sw
:=
generator
.
NewSnippetWriter
(
w
,
c
,
"$"
,
"$"
)
sw
.
Do
(
"// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
\n
"
,
nil
)
sw
.
Do
(
"//
\n
"
,
nil
)
sw
.
Do
(
"// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
\n
"
,
nil
)
sw
.
Do
(
"func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc{
\n
"
,
nil
)
sw
.
Do
(
"return []conversion.GeneratedDeepCopyFunc{
\n
"
,
nil
)
for
_
,
t
:=
range
g
.
typesForInit
{
args
:=
argsFromType
(
t
)
.
With
(
"typeof"
,
c
.
Universe
.
Package
(
"reflect"
)
.
Function
(
"TypeOf"
))
sw
.
Do
(
"{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {in.(*$.type|raw$).DeepCopyInto(out.(*$.type|raw$)); return nil}, InType: $.typeof|raw$(&$.type|raw${})},
\n
"
,
args
)
}
sw
.
Do
(
"}
\n
"
,
nil
)
sw
.
Do
(
"}
\n\n
"
,
nil
)
return
sw
.
Error
()
}
sw
:=
generator
.
NewSnippetWriter
(
w
,
c
,
"$"
,
"$"
)
sw
.
Do
(
"func init() {
\n
"
,
nil
)
sw
.
Do
(
"SchemeBuilder.Register(RegisterDeepCopies)
\n
"
,
nil
)
sw
.
Do
(
"}
\n\n
"
,
nil
)
scheme
:=
c
.
Universe
.
Type
(
types
.
Name
{
Package
:
runtimePackagePath
,
Name
:
"Scheme"
})
schemePtr
:=
&
types
.
Type
{
Kind
:
types
.
Pointer
,
Elem
:
scheme
,
}
sw
.
Do
(
"// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
\n
"
,
nil
)
sw
.
Do
(
"// to allow building arbitrary schemes.
\n
"
,
nil
)
sw
.
Do
(
"//
\n
"
,
nil
)
sw
.
Do
(
"// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
\n
"
,
nil
)
sw
.
Do
(
"func RegisterDeepCopies(scheme $.|raw$) error {
\n
"
,
schemePtr
)
sw
.
Do
(
"return scheme.AddGeneratedDeepCopyFuncs(
\n
"
,
nil
)
for
_
,
t
:=
range
g
.
typesForInit
{
args
:=
argsFromType
(
t
)
.
With
(
"typeof"
,
c
.
Universe
.
Package
(
"reflect"
)
.
Function
(
"TypeOf"
))
sw
.
Do
(
"conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {in.(*$.type|raw$).DeepCopyInto(out.(*$.type|raw$)); return nil}, InType: $.typeof|raw$(&$.type|raw${})},
\n
"
,
args
)
}
sw
.
Do
(
")
\n
"
,
nil
)
sw
.
Do
(
"}
\n\n
"
,
nil
)
return
sw
.
Error
()
}
}
func
(
g
*
genDeepCopy
)
needsGeneration
(
t
*
types
.
Type
)
bool
{
func
(
g
*
genDeepCopy
)
needsGeneration
(
t
*
types
.
Type
)
bool
{
...
...
vendor/k8s.io/gengo/examples/set-gen/generators/sets.go
View file @
729f5a3b
...
@@ -189,7 +189,7 @@ type Empty struct{}
...
@@ -189,7 +189,7 @@ type Empty struct{}
var
setCode
=
`// sets.$.type|public$ is a set of $.type|raw$s, implemented via map[$.type|raw$]struct{} for minimal memory consumption.
var
setCode
=
`// sets.$.type|public$ is a set of $.type|raw$s, implemented via map[$.type|raw$]struct{} for minimal memory consumption.
type $.type|public$ map[$.type|raw$]Empty
type $.type|public$ map[$.type|raw$]Empty
// New creates a $.type|public$ from a list of values.
// New
$.type|public$
creates a $.type|public$ from a list of values.
func New$.type|public$(items ...$.type|raw$) $.type|public$ {
func New$.type|public$(items ...$.type|raw$) $.type|public$ {
ss := $.type|public${}
ss := $.type|public${}
ss.Insert(items...)
ss.Insert(items...)
...
...
vendor/k8s.io/gengo/examples/set-gen/sets/byte.go
View file @
729f5a3b
...
@@ -26,7 +26,7 @@ import (
...
@@ -26,7 +26,7 @@ import (
// sets.Byte is a set of bytes, implemented via map[byte]struct{} for minimal memory consumption.
// sets.Byte is a set of bytes, implemented via map[byte]struct{} for minimal memory consumption.
type
Byte
map
[
byte
]
Empty
type
Byte
map
[
byte
]
Empty
// New creates a Byte from a list of values.
// New
Byte
creates a Byte from a list of values.
func
NewByte
(
items
...
byte
)
Byte
{
func
NewByte
(
items
...
byte
)
Byte
{
ss
:=
Byte
{}
ss
:=
Byte
{}
ss
.
Insert
(
items
...
)
ss
.
Insert
(
items
...
)
...
...
vendor/k8s.io/gengo/examples/set-gen/sets/int.go
View file @
729f5a3b
...
@@ -26,7 +26,7 @@ import (
...
@@ -26,7 +26,7 @@ import (
// sets.Int is a set of ints, implemented via map[int]struct{} for minimal memory consumption.
// sets.Int is a set of ints, implemented via map[int]struct{} for minimal memory consumption.
type
Int
map
[
int
]
Empty
type
Int
map
[
int
]
Empty
// New creates a Int from a list of values.
// New
Int
creates a Int from a list of values.
func
NewInt
(
items
...
int
)
Int
{
func
NewInt
(
items
...
int
)
Int
{
ss
:=
Int
{}
ss
:=
Int
{}
ss
.
Insert
(
items
...
)
ss
.
Insert
(
items
...
)
...
...
vendor/k8s.io/gengo/examples/set-gen/sets/int64.go
View file @
729f5a3b
...
@@ -26,7 +26,7 @@ import (
...
@@ -26,7 +26,7 @@ import (
// sets.Int64 is a set of int64s, implemented via map[int64]struct{} for minimal memory consumption.
// sets.Int64 is a set of int64s, implemented via map[int64]struct{} for minimal memory consumption.
type
Int64
map
[
int64
]
Empty
type
Int64
map
[
int64
]
Empty
// New creates a Int64 from a list of values.
// New
Int64
creates a Int64 from a list of values.
func
NewInt64
(
items
...
int64
)
Int64
{
func
NewInt64
(
items
...
int64
)
Int64
{
ss
:=
Int64
{}
ss
:=
Int64
{}
ss
.
Insert
(
items
...
)
ss
.
Insert
(
items
...
)
...
...
vendor/k8s.io/gengo/examples/set-gen/sets/string.go
View file @
729f5a3b
...
@@ -26,7 +26,7 @@ import (
...
@@ -26,7 +26,7 @@ import (
// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption.
// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption.
type
String
map
[
string
]
Empty
type
String
map
[
string
]
Empty
// New creates a String from a list of values.
// New
String
creates a String from a list of values.
func
NewString
(
items
...
string
)
String
{
func
NewString
(
items
...
string
)
String
{
ss
:=
String
{}
ss
:=
String
{}
ss
.
Insert
(
items
...
)
ss
.
Insert
(
items
...
)
...
...
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