fixed jsonFormat typo

This commit is contained in:
Nikos Polyzotis 2022-07-27 15:46:38 +03:00 committed by ddc
parent e8da3278cd
commit 63c454d647
3 changed files with 6 additions and 5 deletions

View File

@ -99,7 +99,7 @@ A high-performance HTTP benchmarking tool with real-time web UI and terminal dis
Examples:
plow http://127.0.0.1:8080/ -c 20 -n 100000
plow https://httpbin.org/post -c 20 -d 5m --body @file.jsonFormat -T 'application/jsonFormat' -m POST
plow https://httpbin.org/post -c 20 -d 5m --body @file.json -T 'application/json' -m POST
Flags:
--help Show context-sensitive help.

View File

@ -14,6 +14,7 @@ import (
"time"
_ "embed"
cors "github.com/AdhityaRamadhanus/fasthttpcors"
"github.com/go-echarts/go-echarts/v2/charts"
"github.com/go-echarts/go-echarts/v2/components"
@ -42,7 +43,7 @@ function {{ .ViewID }}_sync() {
$.ajax({
type: "GET",
url: "{{ .APIPath }}{{ .Route }}",
dataType: "jsonFormat",
dataType: "json",
success: function (result) {
let opt = goecharts_{{ .ViewID }}.getOption();
let x = opt.xAxis[0].data;
@ -141,8 +142,8 @@ func (c *Charts) newRPSView() components.Charter {
}
type Metrics struct {
Values []interface{} `jsonFormat:"values"`
Time string `jsonFormat:"time"`
Values []interface{} `json:"values"`
Time string `json:"time"`
}
type Charts struct {

View File

@ -83,7 +83,7 @@ var CompactUsageTemplate = `{{define "FormatCommand" -}}
Examples:
plow http://127.0.0.1:8080/ -c 20 -n 100000
plow https://httpbin.org/post -c 20 -d 5m --body @file.jsonFormat -T 'application/jsonFormat' -m POST
plow https://httpbin.org/post -c 20 -d 5m --body @file.json -T 'application/json' -m POST
{{if .Context.Flags -}}
{{T "Flags:"}}