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
42a5b166
Commit
42a5b166
authored
Feb 26, 2018
by
jennybuckley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
run hack/godep-save.sh
parent
28cd9598
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
105 additions
and
53 deletions
+105
-53
Godeps.json
Godeps/Godeps.json
+1
-1
BUILD
vendor/BUILD
+1
-1
BUILD
...hub.com/container-storage-interface/spec/lib/go/csi/BUILD
+0
-16
args.go
vendor/k8s.io/gengo/args/args.go
+21
-4
deepcopy.go
...k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go
+0
-0
defaulter.go
...s.io/gengo/examples/defaulter-gen/generators/defaulter.go
+10
-7
sets.go
vendor/k8s.io/gengo/examples/set-gen/generators/sets.go
+1
-5
byte.go
vendor/k8s.io/gengo/examples/set-gen/sets/byte.go
+2
-2
doc.go
vendor/k8s.io/gengo/examples/set-gen/sets/doc.go
+2
-2
empty.go
vendor/k8s.io/gengo/examples/set-gen/sets/empty.go
+2
-2
int.go
vendor/k8s.io/gengo/examples/set-gen/sets/int.go
+2
-2
int64.go
vendor/k8s.io/gengo/examples/set-gen/sets/int64.go
+2
-2
string.go
vendor/k8s.io/gengo/examples/set-gen/sets/string.go
+2
-2
plural_namer.go
vendor/k8s.io/gengo/namer/plural_namer.go
+58
-6
parse.go
vendor/k8s.io/gengo/parser/parse.go
+1
-1
No files found.
Godeps/Godeps.json
View file @
42a5b166
...
@@ -453,7 +453,7 @@
...
@@ -453,7 +453,7 @@
},
},
{
{
"ImportPath"
:
"github.com/container-storage-interface/spec/lib/go/csi/v0"
,
"ImportPath"
:
"github.com/container-storage-interface/spec/lib/go/csi/v0"
,
"Comment"
:
"v0.1.0-
5-g7ab01a9
"
,
"Comment"
:
"v0.1.0-
19-g31c1670
"
,
"Rev"
:
"31c167062b1a62a9810e4fd94d7c986113b490b8"
"Rev"
:
"31c167062b1a62a9810e4fd94d7c986113b490b8"
},
},
{
{
...
...
vendor/BUILD
View file @
42a5b166
...
@@ -63,7 +63,7 @@ filegroup(
...
@@ -63,7 +63,7 @@ filegroup(
"//vendor/github.com/cockroachdb/cmux:all-srcs",
"//vendor/github.com/cockroachdb/cmux:all-srcs",
"//vendor/github.com/codedellemc/goscaleio:all-srcs",
"//vendor/github.com/codedellemc/goscaleio:all-srcs",
"//vendor/github.com/codegangsta/negroni:all-srcs",
"//vendor/github.com/codegangsta/negroni:all-srcs",
"//vendor/github.com/container-storage-interface/spec/lib/go/csi:all-srcs",
"//vendor/github.com/container-storage-interface/spec/lib/go/csi
/v0
:all-srcs",
"//vendor/github.com/containerd/console:all-srcs",
"//vendor/github.com/containerd/console:all-srcs",
"//vendor/github.com/containerd/containerd/api/services/containers/v1:all-srcs",
"//vendor/github.com/containerd/containerd/api/services/containers/v1:all-srcs",
"//vendor/github.com/containerd/containerd/api/services/tasks/v1:all-srcs",
"//vendor/github.com/containerd/containerd/api/services/tasks/v1:all-srcs",
...
...
vendor/github.com/container-storage-interface/spec/lib/go/csi/BUILD
deleted
100644 → 0
View file @
28cd9598
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//vendor/github.com/container-storage-interface/spec/lib/go/csi/v0:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
vendor/k8s.io/gengo/args/args.go
View file @
42a5b166
...
@@ -23,6 +23,7 @@ import (
...
@@ -23,6 +23,7 @@ import (
"fmt"
"fmt"
"io/ioutil"
"io/ioutil"
"os"
"os"
"path"
"path/filepath"
"path/filepath"
"strconv"
"strconv"
"strings"
"strings"
...
@@ -40,10 +41,11 @@ import (
...
@@ -40,10 +41,11 @@ import (
// before calling AddFlags.
// before calling AddFlags.
func
Default
()
*
GeneratorArgs
{
func
Default
()
*
GeneratorArgs
{
return
&
GeneratorArgs
{
return
&
GeneratorArgs
{
OutputBase
:
DefaultSourceTree
(),
OutputBase
:
DefaultSourceTree
(),
GoHeaderFilePath
:
filepath
.
Join
(
DefaultSourceTree
(),
"k8s.io/gengo/boilerplate/boilerplate.go.txt"
),
GoHeaderFilePath
:
filepath
.
Join
(
DefaultSourceTree
(),
"k8s.io/gengo/boilerplate/boilerplate.go.txt"
),
GeneratedBuildTag
:
"ignore_autogenerated"
,
GeneratedBuildTag
:
"ignore_autogenerated"
,
defaultCommandLineFlags
:
true
,
GeneratedByCommentTemplate
:
"// Code generated by GENERATOR_NAME. DO NOT EDIT."
,
defaultCommandLineFlags
:
true
,
}
}
}
}
...
@@ -64,6 +66,11 @@ type GeneratorArgs struct {
...
@@ -64,6 +66,11 @@ type GeneratorArgs struct {
// Where to get copyright header text.
// Where to get copyright header text.
GoHeaderFilePath
string
GoHeaderFilePath
string
// If GeneratedByCommentTemplate is set, generate a "Code generated by" comment
// below the bloilerplate, of the format defined by this string.
// Any instances of "GENERATOR_NAME" will be replaced with the name of the code generator.
GeneratedByCommentTemplate
string
// If true, only verify, don't write anything.
// If true, only verify, don't write anything.
VerifyOnly
bool
VerifyOnly
bool
...
@@ -103,6 +110,16 @@ func (g *GeneratorArgs) LoadGoBoilerplate() ([]byte, error) {
...
@@ -103,6 +110,16 @@ func (g *GeneratorArgs) LoadGoBoilerplate() ([]byte, error) {
return
nil
,
err
return
nil
,
err
}
}
b
=
bytes
.
Replace
(
b
,
[]
byte
(
"YEAR"
),
[]
byte
(
strconv
.
Itoa
(
time
.
Now
()
.
Year
())),
-
1
)
b
=
bytes
.
Replace
(
b
,
[]
byte
(
"YEAR"
),
[]
byte
(
strconv
.
Itoa
(
time
.
Now
()
.
Year
())),
-
1
)
if
g
.
GeneratedByCommentTemplate
!=
""
{
if
len
(
b
)
!=
0
{
b
=
append
(
b
,
byte
(
'\n'
))
}
generatorName
:=
path
.
Base
(
os
.
Args
[
0
])
generatedByComment
:=
strings
.
Replace
(
g
.
GeneratedByCommentTemplate
,
"GENERATOR_NAME"
,
generatorName
,
-
1
)
s
:=
fmt
.
Sprintf
(
"%s
\n\n
"
,
generatedByComment
)
b
=
append
(
b
,
[]
byte
(
s
)
...
)
}
return
b
,
nil
return
b
,
nil
}
}
...
...
vendor/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go
View file @
42a5b166
This diff is collapsed.
Click to expand it.
vendor/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go
View file @
42a5b166
...
@@ -203,11 +203,6 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
...
@@ -203,11 +203,6 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
packages
:=
generator
.
Packages
{}
packages
:=
generator
.
Packages
{}
header
:=
append
([]
byte
(
fmt
.
Sprintf
(
"// +build !%s
\n\n
"
,
arguments
.
GeneratedBuildTag
)),
boilerplate
...
)
header
:=
append
([]
byte
(
fmt
.
Sprintf
(
"// +build !%s
\n\n
"
,
arguments
.
GeneratedBuildTag
)),
boilerplate
...
)
header
=
append
(
header
,
[]
byte
(
`
// This file was autogenerated by defaulter-gen. Do not edit it manually!
`
)
...
)
// Accumulate pre-existing default functions.
// Accumulate pre-existing default functions.
// TODO: This is too ad-hoc. We need a better way.
// TODO: This is too ad-hoc. We need a better way.
...
@@ -470,6 +465,9 @@ func (c *callTreeForType) build(t *types.Type, root bool) *callNode {
...
@@ -470,6 +465,9 @@ func (c *callTreeForType) build(t *types.Type, root bool) *callNode {
case
types
.
Slice
,
types
.
Array
:
case
types
.
Slice
,
types
.
Array
:
if
child
:=
c
.
build
(
t
.
Elem
,
false
);
child
!=
nil
{
if
child
:=
c
.
build
(
t
.
Elem
,
false
);
child
!=
nil
{
child
.
index
=
true
child
.
index
=
true
if
t
.
Elem
.
Kind
==
types
.
Pointer
{
child
.
elem
=
true
}
parent
.
children
=
append
(
parent
.
children
,
*
child
)
parent
.
children
=
append
(
parent
.
children
,
*
child
)
}
}
case
types
.
Map
:
case
types
.
Map
:
...
@@ -748,7 +746,7 @@ func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode,
...
@@ -748,7 +746,7 @@ func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode,
"var"
:
varName
,
"var"
:
varName
,
}
}
isPointer
:=
n
.
elem
isPointer
:=
n
.
elem
&&
!
n
.
index
if
isPointer
&&
len
(
ancestors
)
>
0
{
if
isPointer
&&
len
(
ancestors
)
>
0
{
sw
.
Do
(
"if $.var$ != nil {
\n
"
,
vars
)
sw
.
Do
(
"if $.var$ != nil {
\n
"
,
vars
)
}
}
...
@@ -756,7 +754,12 @@ func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode,
...
@@ -756,7 +754,12 @@ func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode,
switch
{
switch
{
case
n
.
index
:
case
n
.
index
:
sw
.
Do
(
"for $.index$ := range $.var$ {
\n
"
,
vars
)
sw
.
Do
(
"for $.index$ := range $.var$ {
\n
"
,
vars
)
sw
.
Do
(
"$.local$ := &$.var$[$.index$]
\n
"
,
vars
)
if
n
.
elem
{
sw
.
Do
(
"$.local$ := $.var$[$.index$]
\n
"
,
vars
)
}
else
{
sw
.
Do
(
"$.local$ := &$.var$[$.index$]
\n
"
,
vars
)
}
n
.
writeCalls
(
local
,
true
,
sw
)
n
.
writeCalls
(
local
,
true
,
sw
)
for
i
:=
range
n
.
children
{
for
i
:=
range
n
.
children
{
n
.
children
[
i
]
.
WriteMethod
(
local
,
depth
+
1
,
append
(
ancestors
,
n
),
sw
)
n
.
children
[
i
]
.
WriteMethod
(
local
,
depth
+
1
,
append
(
ancestors
,
n
),
sw
)
...
...
vendor/k8s.io/gengo/examples/set-gen/generators/sets.go
View file @
42a5b166
...
@@ -53,11 +53,7 @@ func Packages(_ *generator.Context, arguments *args.GeneratorArgs) generator.Pac
...
@@ -53,11 +53,7 @@ func Packages(_ *generator.Context, arguments *args.GeneratorArgs) generator.Pac
return
generator
.
Packages
{
&
generator
.
DefaultPackage
{
return
generator
.
Packages
{
&
generator
.
DefaultPackage
{
PackageName
:
"sets"
,
PackageName
:
"sets"
,
PackagePath
:
arguments
.
OutputPackagePath
,
PackagePath
:
arguments
.
OutputPackagePath
,
HeaderText
:
append
(
boilerplate
,
[]
byte
(
HeaderText
:
boilerplate
,
`
// This file was autogenerated by set-gen. Do not edit it manually!
`
)
...
),
PackageDocumentation
:
[]
byte
(
PackageDocumentation
:
[]
byte
(
`// Package sets has auto-generated set types.
`// Package sets has auto-generated set types.
`
),
`
),
...
...
vendor/k8s.io/gengo/examples/set-gen/sets/byte.go
View file @
42a5b166
/*
/*
Copyright
2017
The Kubernetes Authors.
Copyright 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.
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
//
This file was autogenerated by set-gen. Do not edit it manually!
//
Code generated by set-gen. DO NOT EDIT.
package
sets
package
sets
...
...
vendor/k8s.io/gengo/examples/set-gen/sets/doc.go
View file @
42a5b166
/*
/*
Copyright
2017
The Kubernetes Authors.
Copyright 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.
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
//
This file was autogenerated by set-gen. Do not edit it manually!
//
Code generated by set-gen. DO NOT EDIT.
// Package sets has auto-generated set types.
// Package sets has auto-generated set types.
package
sets
package
sets
vendor/k8s.io/gengo/examples/set-gen/sets/empty.go
View file @
42a5b166
/*
/*
Copyright
2017
The Kubernetes Authors.
Copyright 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.
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
//
This file was autogenerated by set-gen. Do not edit it manually!
//
Code generated by set-gen. DO NOT EDIT.
package
sets
package
sets
...
...
vendor/k8s.io/gengo/examples/set-gen/sets/int.go
View file @
42a5b166
/*
/*
Copyright
2017
The Kubernetes Authors.
Copyright 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.
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
//
This file was autogenerated by set-gen. Do not edit it manually!
//
Code generated by set-gen. DO NOT EDIT.
package
sets
package
sets
...
...
vendor/k8s.io/gengo/examples/set-gen/sets/int64.go
View file @
42a5b166
/*
/*
Copyright
2017
The Kubernetes Authors.
Copyright 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.
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
//
This file was autogenerated by set-gen. Do not edit it manually!
//
Code generated by set-gen. DO NOT EDIT.
package
sets
package
sets
...
...
vendor/k8s.io/gengo/examples/set-gen/sets/string.go
View file @
42a5b166
/*
/*
Copyright
2017
The Kubernetes Authors.
Copyright 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.
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
...
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
//
This file was autogenerated by set-gen. Do not edit it manually!
//
Code generated by set-gen. DO NOT EDIT.
package
sets
package
sets
...
...
vendor/k8s.io/gengo/namer/plural_namer.go
View file @
42a5b166
...
@@ -22,6 +22,8 @@ import (
...
@@ -22,6 +22,8 @@ import (
"k8s.io/gengo/types"
"k8s.io/gengo/types"
)
)
var
consonants
=
"bcdfghjklmnpqrsttvwxyz"
type
pluralNamer
struct
{
type
pluralNamer
struct
{
// key is the case-sensitive type name, value is the case-insensitive
// key is the case-sensitive type name, value is the case-insensitive
// intended output.
// intended output.
...
@@ -56,13 +58,63 @@ func (r *pluralNamer) Name(t *types.Type) string {
...
@@ -56,13 +58,63 @@ func (r *pluralNamer) Name(t *types.Type) string {
if
plural
,
ok
=
r
.
exceptions
[
singular
];
ok
{
if
plural
,
ok
=
r
.
exceptions
[
singular
];
ok
{
return
r
.
finalize
(
plural
)
return
r
.
finalize
(
plural
)
}
}
switch
string
(
singular
[
len
(
singular
)
-
1
])
{
if
len
(
singular
)
<
2
{
case
"s"
,
"x"
:
return
r
.
finalize
(
plural
)
plural
=
singular
+
"es"
}
case
"y"
:
plural
=
singular
[
:
len
(
singular
)
-
1
]
+
"ies"
switch
rune
(
singular
[
len
(
singular
)
-
1
])
{
case
's'
,
'x'
,
'z'
:
plural
=
esPlural
(
singular
)
case
'y'
:
sl
:=
rune
(
singular
[
len
(
singular
)
-
2
])
if
isConsonant
(
sl
)
{
plural
=
iesPlural
(
singular
)
}
else
{
plural
=
sPlural
(
singular
)
}
case
'h'
:
sl
:=
rune
(
singular
[
len
(
singular
)
-
2
])
if
sl
==
'c'
||
sl
==
's'
{
plural
=
esPlural
(
singular
)
}
else
{
plural
=
sPlural
(
singular
)
}
case
'e'
:
sl
:=
rune
(
singular
[
len
(
singular
)
-
2
])
if
sl
==
'f'
{
plural
=
vesPlural
(
singular
[
:
len
(
singular
)
-
1
])
}
else
{
plural
=
sPlural
(
singular
)
}
case
'f'
:
plural
=
vesPlural
(
singular
)
default
:
default
:
plural
=
s
ingular
+
"s"
plural
=
s
Plural
(
singular
)
}
}
return
r
.
finalize
(
plural
)
return
r
.
finalize
(
plural
)
}
}
func
iesPlural
(
singular
string
)
string
{
return
singular
[
:
len
(
singular
)
-
1
]
+
"ies"
}
func
vesPlural
(
singular
string
)
string
{
return
singular
[
:
len
(
singular
)
-
1
]
+
"ves"
}
func
esPlural
(
singular
string
)
string
{
return
singular
+
"es"
}
func
sPlural
(
singular
string
)
string
{
return
singular
+
"s"
}
func
isConsonant
(
char
rune
)
bool
{
for
_
,
c
:=
range
consonants
{
if
char
==
c
{
return
true
}
}
return
false
}
vendor/k8s.io/gengo/parser/parse.go
View file @
42a5b166
...
@@ -578,7 +578,7 @@ func splitLines(str string) []string {
...
@@ -578,7 +578,7 @@ func splitLines(str string) []string {
}
}
func
tcFuncNameToName
(
in
string
)
types
.
Name
{
func
tcFuncNameToName
(
in
string
)
types
.
Name
{
name
:=
strings
.
Trim
Left
(
in
,
"func "
)
name
:=
strings
.
Trim
Prefix
(
in
,
"func "
)
nameParts
:=
strings
.
Split
(
name
,
"("
)
nameParts
:=
strings
.
Split
(
name
,
"("
)
return
tcNameToName
(
nameParts
[
0
])
return
tcNameToName
(
nameParts
[
0
])
}
}
...
...
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