k3s/pkg/util
k8s-merge-robot 5ca769e0a3 Merge pull request #25038 from mfojtik/json-line
Automatic merge from submit-queue

Display line number on JSON errors

Related issue: https://github.com/kubernetes/kubernetes/issues/12231

This PR will introduce line numbers for all JSON errors in the CLI:

(this is existing error reporting for YAML)
```console
$ kubectl create -f broken.yaml
yaml: line 8: mapping values are not allowed in this context
```

(this is error reporting proposed in this PR for JSON)
```console
$ kubectl create -f broken.json
json: line 35: invalid character '{' after object key
```

(and this is the current reporting:)
```console
$ kubectl create -f broken.json
invalid character '{' after object key
```
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-10 02:49:01 -07:00
..
bandwidth kubenet: hook pod bandwidth resources up to shaper 2016-04-19 15:32:46 -05:00
cache fix immediate evict in cache 2016-04-13 09:29:58 -05:00
chmod FSGroup implementation 2015-10-22 16:40:59 -04:00
chown FSGroup implementation 2015-10-22 16:40:59 -04:00
codeinspector Implement checking in predicates 2016-02-25 21:25:36 +08:00
config Refactor config map into sub pkg 2016-03-21 14:50:57 +08:00
configz Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
crlf Refactor crlf & crypto 2016-03-21 20:20:05 +08:00
crypto Refactor crlf & crypto 2016-03-21 20:20:05 +08:00
dbus Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
deployment Fix incorrect comments in IsPodAvailable 2016-05-03 13:05:02 -07:00
diff Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
env Refactor env into sub pkg 2016-03-11 13:52:45 +08:00
errors Address comments 2016-03-03 15:56:09 -08:00
exec Improve error reporting a little in ingress e2e. 2016-01-06 15:25:04 -08:00
flag Merge pull request #22939 from resouer/util-sub-dir 2016-03-23 03:34:33 -07:00
flock kubelet: add a pidfile 2016-02-10 11:38:50 -08:00
flowcontrol Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
flushwriter
framer Fix bug in json framer. 2016-05-04 15:02:07 +02:00
goroutinemap Introduce a data structure for managing go routines by unique name. 2016-05-02 12:02:34 -07:00
hash Use hashutil to hold hash tools 2016-01-06 22:28:58 +08:00
homedir Use correct home directory on Windows 2016-02-19 01:41:42 -02:00
httpstream Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
integer create some integer min/max function 2016-02-12 11:20:11 +08:00
interrupt Unify termination signal handling across platforms 2016-04-28 15:35:50 +02:00
intstr Strip side-effect imports from generated protobuf 2016-05-02 18:12:20 -04:00
io Remove all instances of "/tmp" from unit tests and replace with a common 2016-01-27 16:11:22 -08:00
iptables fix a few go-vet errors 2016-02-09 13:20:31 -08:00
json Preserve int64 data when patching 2016-04-11 16:23:28 -04:00
jsonpath Fix jsonpath to handle maps with key of nonstring types 2016-03-22 17:32:40 -04:00
keymutex Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
labels Improve go report card by fixing typos in comments 2016-03-04 18:30:59 -08:00
limitwriter
metrics Generated clients can return their RESTClients, RESTClient can return its RateLimiter 2016-04-27 22:15:10 +02:00
mount fix cinder volume dir umount issue #24717 2016-04-29 00:50:33 +08:00
net support CIDRs in NO_PROXY 2016-03-16 16:22:54 -04:00
node
oom OOM Score adjusting logic in kubelet should handle containers that exit quickly. 2016-04-11 11:21:48 -07:00
parsers Cleanup the code with new engine-api 2016-04-29 13:34:38 -07:00
pod Generate the typed clients under the clientset folder 2016-03-31 15:28:45 -07:00
procfs OOM Score adjusting logic in kubelet should handle containers that exit quickly. 2016-04-11 11:21:48 -07:00
proxy Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
rand GCE: Allow nodes to exceed target pool maximums 2016-05-09 21:44:58 -07:00
replicaset Generate the typed clients under the clientset folder 2016-03-31 15:28:45 -07:00
runtime Track deletes in rc manager with a UID expectations cache. 2016-03-05 18:18:18 -08:00
selinux Bump cadvisor to fix interface stats bugs & improve performance 2015-12-21 17:07:21 +00:00
sets Regenerate auto-generated files 2016-03-17 09:30:02 +01:00
slice
strategicpatch Preserve int64 data when patching 2016-04-11 16:23:28 -04:00
strings Add strings pkg to hold strings utils 2016-01-15 12:37:50 +08:00
sysctl Refactor an interface for style 2015-11-13 15:56:27 -08:00
system Move isMasterNode function to api/helpers 2016-03-01 12:12:38 +01:00
term Improve terminal reuse and attach 2016-03-21 23:59:58 -04:00
testing Use NegotiatedSerializer in client 2016-05-04 10:57:36 +02:00
threading Refector deadlock into detector pkg 2016-03-21 20:20:05 +08:00
validation Removing IPv4 enforcement on Endpoints 2016-04-14 16:20:00 +01:00
wait Add unit test for JitterUntil 2016-02-07 21:09:06 +01:00
workqueue Merge pull request #24248 from wojtek-t/parallel_predicates 2016-04-16 09:51:45 -07:00
wsstream Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
yaml Display line number on JSON errors 2016-05-06 13:10:47 +02:00
clock.go fake util.clock tick 2016-04-07 15:10:50 -04:00
clock_test.go fake util.clock tick 2016-04-07 15:10:50 -04:00
doc.go
line_delimiter.go
line_delimiter_test.go Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
logs.go Move Until, Forever, NeverStop, ForeverTestTimeout from util to wait 2016-02-07 11:38:48 +01:00
resource_container_linux.go Ensure kubelet pid is not moved to system container 2016-01-29 09:30:20 +00:00
resource_container_unsupported.go
runner.go
runner_test.go
string_flag.go
template.go
template_test.go
trace.go Trace.Step() performs an unnecessary ref 2016-05-06 11:42:35 -04:00
umask.go
umask_windows.go
util.go Fix the rest of the code 2016-04-29 17:12:10 -04:00
util_test.go Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
uuid.go Speed up UUID generation. 2016-01-27 15:39:23 +01:00