Skip to content

Commit

Permalink
fixed jsonFormat typo
Browse files Browse the repository at this point in the history
  • Loading branch information
npolyzotisatypon authored and six-ddc committed Jul 28, 2022
1 parent e8da327 commit 63c454d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 4 additions & 3 deletions charts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:"}}
Expand Down

0 comments on commit 63c454d

Please sign in to comment.