Commit Graph

30 Commits (ec1371b2b19b618e2ee66748032e8392c6df9398)

Author SHA1 Message Date
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Kubernetes Submit Queue f98c06b1bb Merge pull request #33901 from jmcarp/issue-31984
Automatic merge from submit-queue

Escape special characters in jsonpath field names.

There may be a better way to do this, but this seemed like the simplest possible version.

Example: `{.items[*].metadata.labels.kubernetes\.io/hostname}`

[Resolves #31984]
2016-10-17 18:29:31 -07:00
Joshua Carp b48deebc7a Run gofmt. 2016-10-14 00:35:44 -04:00
Joshua Carp 6787b67152 Factor advance logic into helper function.
h/t @brendandburns
2016-10-03 22:43:22 -04:00
Joshua Carp be3f556b77 Escape special characters in jsonpath field names.
Example: `{.items[*].metadata.labels.kubernetes\.io/hostname}`

[Resolves #31984]
2016-10-02 23:54:13 -04:00
Clayton Coleman bcea2c8a4e
Allow missing keys in jsonpath
It is common in constrained circumstances to prefer an empty string
result from JSONPath templates for missing keys over an error. Several
other implementations provide this (the canonical JS and PHP, as well as
the Java implementation).  This also mirrors gotemplate, which allows
Options("missingkey=zero").

Added simple check and simple test case.
2016-08-30 13:06:26 -04:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
k8s-merge-robot 4da14c8a64 Merge pull request #28204 from thockin/cleanup-third_party
Automatic merge from submit-queue

Cleanup third party (pt 2)

Move forked-and-hacked golang code to the forked/ directory.  Remove ast/build/parse code that is now in stdlib.  Remove unused shell2junit
2016-07-07 12:13:14 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Tim Hockin 8c42c08363 move forked golang code to a common dir with LICENSE 2016-06-28 22:57:45 -07:00
Tim Hockin 64d55887dc Move hacked golang template code to forked/ dir 2016-06-28 22:57:45 -07:00
Avesh Agarwal d5e135e42c Fix jsonpath to handle maps with key of nonstring types 2016-03-22 17:32:40 -04:00
Clayton Coleman 33085c0cf2 Update tests to handle codec changes 2016-01-22 13:27:26 -05:00
Clayton Coleman 9d5df20efe jsonpath: Handle interface{}(nil) as empty array 2016-01-21 23:18:31 -05:00
Dai Zuozhuo ad5cc8b599 quote interpreted string 2015-11-19 11:15:10 +08:00
deads2k e683842359 stop panicing on bad array length 2015-11-09 13:23:16 -05:00
Janet Kuo 4d92268212 Better error handling for output format when "kubectl config view" 2015-11-02 16:25:52 -08:00
feisky 8ad6b8f035 Fix typo error 2015-10-12 18:57:56 +08:00
Daniel Martí 5f3aff2c43 Fix struct input test in jsonpath 2015-09-10 11:44:13 -07:00
Dai Zuozhuo 2e2ef3e830 change -o template to -o go-template=... 2015-09-05 22:30:47 +08:00
Dai Zuozhuo 9ccceac5e8 sort jsonpath_test results 2015-09-05 22:29:35 +08:00
Brendan Burns de14623775 Add a printer that knows how to print user-defined columns 2015-09-01 10:11:13 -07:00
Jerzy Szczepkowski 9d058c9e52 Commented-out flaky case of json path test.
Commented-out flaky case of json path test. Related to #13024.
2015-08-21 13:47:04 +02:00
Dai Zuozhuo 85972c44a4 jsonpath user guide docs 2015-08-20 09:11:04 +08:00
Dai Zuozhuo b61a905b19 add jsonpath to kubectl 2015-08-20 08:57:24 +08:00
Brendan Burns 99b8df1812 Add field based sorting to the kubectl command line. 2015-08-12 16:51:36 -07:00
Kris Rousey 565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
Veres Lajos 9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Dai Zuozhuo 949704af2c jsonpath template 2015-07-28 10:17:56 +08:00