made tutorial outputs more presentable (#555)
Closes https://github.com/ooni/probe/issues/1831
This commit is contained in:
committed by
GitHub
parent
a9319142f3
commit
3f0da81bf8
@@ -85,7 +85,7 @@ Let us run the program with default arguments first. You can do
|
||||
this operation by running:
|
||||
|
||||
```bash
|
||||
go run -race ./internal/tutorial/measurex/chapter02
|
||||
go run -race ./internal/tutorial/measurex/chapter02 | jq
|
||||
```
|
||||
|
||||
Here is the JSON we obtain in output:
|
||||
@@ -129,7 +129,7 @@ Let us now see if we can provoke some errors and timeouts.
|
||||
Let us start with an IP address where there's no listening socket:
|
||||
|
||||
```bash
|
||||
go run -race ./internal/tutorial/measurex/chapter02 -address 127.0.0.1:1
|
||||
go run -race ./internal/tutorial/measurex/chapter02 -address 127.0.0.1:1 | jq
|
||||
```
|
||||
|
||||
We get this JSON:
|
||||
@@ -161,7 +161,7 @@ the oddity that classifies the error.
|
||||
Let us now try to obtain a timeout:
|
||||
|
||||
```bash
|
||||
go run -race ./internal/tutorial/measurex/chapter02 -address 8.8.4.4:1
|
||||
go run -race ./internal/tutorial/measurex/chapter02 -address 8.8.4.4:1 | jq
|
||||
```
|
||||
|
||||
We get this JSON:
|
||||
@@ -192,7 +192,7 @@ precise than just the error alone.
|
||||
Let us now use a very small timeout:
|
||||
|
||||
```bash
|
||||
go run -race ./internal/tutorial/measurex/chapter02 -address 8.8.4.4:1 -timeout 100ms
|
||||
go run -race ./internal/tutorial/measurex/chapter02 -address 8.8.4.4:1 -timeout 100ms | jq
|
||||
```
|
||||
|
||||
To get this JSON:
|
||||
|
||||
@@ -86,7 +86,7 @@ func main() {
|
||||
// this operation by running:
|
||||
//
|
||||
// ```bash
|
||||
// go run -race ./internal/tutorial/measurex/chapter02
|
||||
// go run -race ./internal/tutorial/measurex/chapter02 | jq
|
||||
// ```
|
||||
//
|
||||
// Here is the JSON we obtain in output:
|
||||
@@ -130,7 +130,7 @@ func main() {
|
||||
// Let us start with an IP address where there's no listening socket:
|
||||
//
|
||||
// ```bash
|
||||
// go run -race ./internal/tutorial/measurex/chapter02 -address 127.0.0.1:1
|
||||
// go run -race ./internal/tutorial/measurex/chapter02 -address 127.0.0.1:1 | jq
|
||||
// ```
|
||||
//
|
||||
// We get this JSON:
|
||||
@@ -162,7 +162,7 @@ func main() {
|
||||
// Let us now try to obtain a timeout:
|
||||
//
|
||||
// ```bash
|
||||
// go run -race ./internal/tutorial/measurex/chapter02 -address 8.8.4.4:1
|
||||
// go run -race ./internal/tutorial/measurex/chapter02 -address 8.8.4.4:1 | jq
|
||||
// ```
|
||||
//
|
||||
// We get this JSON:
|
||||
@@ -193,7 +193,7 @@ func main() {
|
||||
// Let us now use a very small timeout:
|
||||
//
|
||||
// ```bash
|
||||
// go run -race ./internal/tutorial/measurex/chapter02 -address 8.8.4.4:1 -timeout 100ms
|
||||
// go run -race ./internal/tutorial/measurex/chapter02 -address 8.8.4.4:1 -timeout 100ms | jq
|
||||
// ```
|
||||
//
|
||||
// To get this JSON:
|
||||
|
||||
Reference in New Issue
Block a user