Skip to content

Commit 5591640

Browse files
committed
Update README.md
1 parent 99e9e55 commit 5591640

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: README.md

+9
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ Using `-readjson`, you can tell `ts` to parse each input line as a separate JSON
120120

121121
```bash
122122
$ echo '{"hello": "World"}' | ts -readjson -template "{{.TimeString}} {{.Object.hello}}"
123+
```
124+
125+
```
123126
2018-01-25T21:55:06+01:00 World
124127
```
125128

@@ -130,6 +133,9 @@ This allows you to use only specific fields of the object as stopwatch reset tri
130133
```bash
131134
$ (echo {}; sleep 1; echo {}; sleep 1; echo '{"reset": "yes"}'; echo {}) |
132135
ts -jsontemplate "{{.reset}}" -start yes -template "{{.I}} {{.DeltaNanos}}"
136+
```
137+
138+
```
133139
0 14374
134140
1 1005916918
135141
2 2017292187
@@ -140,6 +146,9 @@ The output of the JSON template is stored in the field `.JSONText` of the `line`
140146

141147
```bash
142148
$ echo '{"message":"hello"}' | ts -jsontemplate "{{.message}}" -template "{{.TimeString}} {{.JSONText}}"
149+
```
150+
151+
```
143152
2018-01-25T22:20:59+01:00 hello
144153
```
145154

0 commit comments

Comments
 (0)