Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ijaz Ahmad
ksonnet
Commits
db01a3df
Unverified
Commit
db01a3df
authored
Apr 27, 2018
by
bryanl
Browse files
updating ksonnet-lib to v0.1.3
Signed-off-by:
bryanl
<
bryanliles@gmail.com
>
parent
b0012b7e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
Gopkg.lock
Gopkg.lock
+3
-3
Gopkg.toml
Gopkg.toml
+1
-1
vendor/github.com/ksonnet/ksonnet-lib/ksonnet-gen/printer/printer.go
...ub.com/ksonnet/ksonnet-lib/ksonnet-gen/printer/printer.go
+19
-0
No files found.
Gopkg.lock
View file @
db01a3df
...
...
@@ -276,8 +276,8 @@
"ksonnet-gen/nodemaker",
"ksonnet-gen/printer"
]
revision = "
cd6bc29c939b79f8e3acdd289356b8fbebf09c50
"
version = "v0.1.
2
"
revision = "
d15220fdcdd07fd377894abff6276d86cb2d776d
"
version = "v0.1.
3
"
[[projects]]
name = "github.com/magiconair/properties"
...
...
@@ -683,6 +683,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "
066e8e0e2eb8273f1f1249c55430ee212d20b3ebe5db9b7070d7e61cf2e61524
"
inputs-digest = "
4723225126a0d372380758876922a0039f08308216c8dce85461e7c7c742351f
"
solver-name = "gps-cdcl"
solver-version = 1
Gopkg.toml
View file @
db01a3df
...
...
@@ -50,7 +50,7 @@
[[constraint]]
name
=
"github.com/ksonnet/ksonnet-lib"
version
=
"v0.1.
2
"
version
=
"v0.1.
3
"
[[constraint]]
name
=
"github.com/mattn/go-isatty"
...
...
vendor/github.com/ksonnet/ksonnet-lib/ksonnet-gen/printer/printer.go
View file @
db01a3df
...
...
@@ -112,6 +112,12 @@ func (p *printer) writeString(s string) {
}
}
func
(
p
*
printer
)
writeStringNoIndent
(
s
string
)
{
for
_
,
b
:=
range
[]
byte
(
s
)
{
p
.
output
=
append
(
p
.
output
,
b
)
}
}
// printer prints a node.
// nolint: gocyclo
func
(
p
*
printer
)
print
(
n
interface
{})
{
...
...
@@ -158,6 +164,8 @@ func (p *printer) print(n interface{}) {
p
.
print
(
t
.
Right
)
case
*
ast
.
Conditional
:
p
.
handleConditional
(
t
)
case
*
ast
.
Dollar
:
p
.
writeString
(
"$"
)
case
*
ast
.
Function
:
p
.
writeString
(
"function"
)
p
.
addMethodSignature
(
t
)
...
...
@@ -242,6 +250,11 @@ func (p *printer) print(n interface{}) {
p
.
writeString
(
strconv
.
Quote
(
t
.
Value
))
case
ast
.
StringSingle
:
p
.
writeString
(
fmt
.
Sprintf
(
"'%s'"
,
t
.
Value
))
case
ast
.
StringBlock
:
p
.
writeString
(
"|||"
)
p
.
writeByte
(
newline
,
1
)
p
.
writeString
(
t
.
Value
)
p
.
writeStringNoIndent
(
"
\n
|||"
)
}
case
*
ast
.
LiteralNumber
:
...
...
@@ -254,6 +267,9 @@ func (p *printer) print(n interface{}) {
p
.
writeString
(
string
(
t
.
Id
))
case
*
ast
.
LiteralNull
:
p
.
writeString
(
"null"
)
case
*
ast
.
SuperIndex
:
p
.
writeString
(
"super."
)
p
.
writeString
(
string
(
*
t
.
Id
))
}
}
...
...
@@ -585,6 +601,9 @@ func indexID(i *ast.Index) (string, error) {
switch
t
:=
i
.
Index
.
(
type
)
{
default
:
return
""
,
errors
.
Errorf
(
"can't handle index type %T"
,
t
)
case
*
ast
.
LiteralNumber
:
id
:=
t
.
OriginalString
return
fmt
.
Sprintf
(
`[%s]`
,
id
),
nil
case
*
ast
.
LiteralString
:
if
t
==
nil
{
return
""
,
errors
.
New
(
"string id is nil"
)
...
...
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