Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ijaz Ahmad
ksonnet
Commits
e3806408
Unverified
Commit
e3806408
authored
Mar 08, 2018
by
Bryan Liles
Committed by
GitHub
Mar 08, 2018
Browse files
Merge pull request #350 from bryanl/bug-extension-map-container
bug: mapContainer extension typo
parents
2b4acaf2
c6aa7d28
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
10 deletions
+40
-10
Gopkg.lock
Gopkg.lock
+2
-2
Gopkg.toml
Gopkg.toml
+1
-1
vendor/github.com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet/catalog.go
...ub.com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet/catalog.go
+1
-1
vendor/github.com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet/extension.go
....com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet/extension.go
+1
-1
vendor/github.com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet/properties.go
...com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet/properties.go
+1
-1
vendor/github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker/nodemaker.go
...om/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker/nodemaker.go
+34
-4
No files found.
Gopkg.lock
View file @
e3806408
...
...
@@ -232,7 +232,7 @@
"ksonnet-gen/nodemaker",
"ksonnet-gen/printer"
]
revision = "
b13dc1c505011ee838ae45324994dac432233000
"
revision = "
9f27c242ff65da0620f8324cc0cd50c8ef00bf5b
"
[[projects]]
branch = "master"
...
...
@@ -610,6 +610,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "
e99bb34d06691779ec855657a6aa077e80428aee4db1141c5849a84420033170
"
inputs-digest = "
0b7cc9568e8af03ad2c4e3b5febdef644b40057c6c01aced232c101df726ca4e
"
solver-name = "gps-cdcl"
solver-version = 1
Gopkg.toml
View file @
e3806408
...
...
@@ -54,7 +54,7 @@
[[constraint]]
name
=
"github.com/ksonnet/ksonnet-lib"
revision
=
"
b13dc1c505011ee838ae45324994dac432233000
"
revision
=
"
9f27c242ff65da0620f8324cc0cd50c8ef00bf5b
"
[[constraint]]
name
=
"github.com/mattn/go-isatty"
...
...
vendor/github.com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet/catalog.go
View file @
e3806408
...
...
@@ -152,7 +152,7 @@ func (c *Catalog) Fields() ([]Field, error) {
return
nil
,
errors
.
Wrapf
(
err
,
"parse description for %s"
,
name
)
}
// If there is a path, this should ot be a hidden object. This
// If there is a path, this should
n
ot be a hidden object. This
// makes this schema a field.
if
_
,
ok
:=
c
.
paths
[
name
];
ok
{
continue
...
...
vendor/github.com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet/extension.go
View file @
e3806408
...
...
@@ -275,7 +275,7 @@ func setArray(varName string) *nm.Conditional {
}
func
genIsIntersection
(
a
,
b
nm
.
Noder
)
*
nm
.
Binary
{
intersection
:=
nm
.
ApplyCall
(
"std.Inter"
,
a
,
b
)
intersection
:=
nm
.
ApplyCall
(
"std.
set
Inter"
,
a
,
b
)
checkLen
:=
nm
.
ApplyCall
(
"std.length"
,
intersection
)
return
nm
.
NewBinary
(
...
...
vendor/github.com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet/properties.go
View file @
e3806408
...
...
@@ -74,7 +74,7 @@ func isSkippedProperty(name string, schema spec.Schema) bool {
return
true
}
if
strings
.
Contains
(
strings
.
ToLower
(
schema
.
Description
),
"read-only"
)
{
if
strings
.
Contains
(
strings
.
ToLower
(
schema
.
Description
),
"read-only"
)
&&
name
!=
"readOnly"
{
return
true
}
...
...
vendor/github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker/nodemaker.go
View file @
e3806408
...
...
@@ -87,6 +87,13 @@ func KVFromMap(m map[string]interface{}) (*Object, error) {
return
nil
,
err
}
o
.
Set
(
InheritedKey
(
name
),
child
)
case
map
[
string
]
interface
{}
:
child
,
err
:=
KVFromMap
(
t
)
if
err
!=
nil
{
return
nil
,
err
}
o
.
Set
(
InheritedKey
(
name
),
child
)
default
:
return
nil
,
errors
.
Errorf
(
"unsupported type %T"
,
t
)
...
...
@@ -179,6 +186,10 @@ func (o *Object) Keys() []Key {
return
keys
}
var
(
reField
=
regexp
.
MustCompile
(
`^[A-Za-z]+[A-Za-z0-9]*$`
)
)
// Node converts the object to a jsonnet node.
func
(
o
*
Object
)
Node
()
ast
.
Node
{
ao
:=
&
astext
.
Object
{
...
...
@@ -193,12 +204,21 @@ func (o *Object) Node() ast.Node {
Comment
:
o
.
generateComment
(
k
.
comment
),
}
if
k
.
category
==
ast
.
ObjectFieldStr
{
of
.
Expr1
=
NewStringDouble
(
k
.
name
)
.
Node
()
if
k
.
category
==
ast
.
ObjectLocal
{
of
.
Id
=
newIdentifier
(
name
)
of
.
Kind
=
k
.
category
}
else
if
stringInSlice
(
name
,
jsonnetReservedWords
)
{
of
.
Expr1
=
NewStringDouble
(
name
)
.
Node
()
of
.
Kind
=
ast
.
ObjectFieldStr
}
else
if
reField
.
MatchString
(
name
)
{
id
:=
ast
.
Identifier
(
name
)
of
.
Kind
=
ast
.
ObjectFieldID
of
.
Id
=
&
id
}
else
{
of
.
Id
=
newIdentifier
(
k
.
name
)
of
.
Expr1
=
NewStringDouble
(
name
)
.
Node
()
of
.
Kind
=
ast
.
ObjectFieldStr
}
of
.
Kind
=
k
.
category
of
.
Hide
=
k
.
visibility
of
.
Expr2
=
v
.
Node
()
of
.
Method
=
k
.
Method
()
...
...
@@ -939,3 +959,13 @@ func newIdentifier(value string) *ast.Identifier {
id
:=
ast
.
Identifier
(
value
)
return
&
id
}
func
stringInSlice
(
s
string
,
sl
[]
string
)
bool
{
for
i
:=
range
sl
{
if
sl
[
i
]
==
s
{
return
true
}
}
return
false
}
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