mirror of
https://github.com/aykhans/dodo.git
synced 2025-04-23 20:03:08 +00:00
🔨 update table rendering
This commit is contained in:
parent
9a35874559
commit
b49db230ed
@ -41,18 +41,29 @@ func (config *RequestConfig) Print() {
|
|||||||
t := table.NewWriter()
|
t := table.NewWriter()
|
||||||
t.SetOutputMirror(os.Stdout)
|
t.SetOutputMirror(os.Stdout)
|
||||||
t.SetStyle(table.StyleLight)
|
t.SetStyle(table.StyleLight)
|
||||||
t.AppendRow(table.Row{
|
t.SetAllowedRowLength(125)
|
||||||
"Method", "URL", "Timeout", "Dodos",
|
|
||||||
"Request Count", "Params Count",
|
t.AppendHeader(table.Row{"Request Configuration"})
|
||||||
"Headers Count", "Cookies Count",
|
t.AppendRow(table.Row{"Method", config.Method})
|
||||||
"Proxies Count", "Body"})
|
|
||||||
t.AppendSeparator()
|
t.AppendSeparator()
|
||||||
t.AppendRow(table.Row{
|
t.AppendRow(table.Row{"URL", config.URL})
|
||||||
config.Method, config.URL,
|
t.AppendSeparator()
|
||||||
fmt.Sprintf("%dms", config.Timeout/time.Millisecond),
|
t.AppendRow(table.Row{"Timeout", fmt.Sprintf("%dms", config.Timeout/time.Millisecond)})
|
||||||
config.DodosCount, config.RequestCount,
|
t.AppendSeparator()
|
||||||
len(config.Params), len(config.Headers),
|
t.AppendRow(table.Row{"Dodos", config.DodosCount})
|
||||||
len(config.Cookies), len(config.Proxies), config.Body})
|
t.AppendSeparator()
|
||||||
|
t.AppendRow(table.Row{"Request Count", config.RequestCount})
|
||||||
|
t.AppendSeparator()
|
||||||
|
t.AppendRow(table.Row{"Params Count", len(config.Params)})
|
||||||
|
t.AppendSeparator()
|
||||||
|
t.AppendRow(table.Row{"Headers Count", len(config.Headers)})
|
||||||
|
t.AppendSeparator()
|
||||||
|
t.AppendRow(table.Row{"Cookies Count", len(config.Cookies)})
|
||||||
|
t.AppendSeparator()
|
||||||
|
t.AppendRow(table.Row{"Proxies Count", len(config.Proxies)})
|
||||||
|
t.AppendSeparator()
|
||||||
|
t.AppendRow(table.Row{"Body", config.Body})
|
||||||
|
|
||||||
t.Render()
|
t.Render()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ func (respones *Responses) Print() {
|
|||||||
t := table.NewWriter()
|
t := table.NewWriter()
|
||||||
t.SetOutputMirror(os.Stdout)
|
t.SetOutputMirror(os.Stdout)
|
||||||
t.SetStyle(table.StyleLight)
|
t.SetStyle(table.StyleLight)
|
||||||
|
t.SetAllowedRowLength(125)
|
||||||
t.AppendHeader(table.Row{
|
t.AppendHeader(table.Row{
|
||||||
"Response",
|
"Response",
|
||||||
"Count",
|
"Count",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user