mirror of
https://github.com/aykhans/dodo.git
synced 2025-04-21 11:16:47 +00:00
Compare commits
5 Commits
8a3574cd48
...
ca6b3d4eb2
Author | SHA1 | Date | |
---|---|---|---|
ca6b3d4eb2 | |||
1ee06aacc3 | |||
3d5834a6a6 | |||
f1521cbb74 | |||
40f8a1cc37 |
@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
VERSION string = "0.5.5"
|
||||
VERSION string = "0.5.501"
|
||||
DefaultUserAgent string = "Dodo/" + VERSION
|
||||
ProxyCheckURL string = "https://www.google.com"
|
||||
DefaultMethod string = "GET"
|
||||
@ -79,7 +79,7 @@ func (config *RequestConfig) Print() {
|
||||
t.AppendSeparator()
|
||||
t.AppendRow(table.Row{"Cookies", string(utils.PrettyJSONMarshal(config.Cookies, 3, "", " "))})
|
||||
t.AppendSeparator()
|
||||
t.AppendRow(table.Row{"Proxies Count", string(utils.PrettyJSONMarshal(config.Proxies, 3, "", " "))})
|
||||
t.AppendRow(table.Row{"Proxies", string(utils.PrettyJSONMarshal(config.Proxies, 3, "", " "))})
|
||||
t.AppendSeparator()
|
||||
t.AppendRow(table.Row{"Proxy Check", !config.NoProxyCheck})
|
||||
t.AppendSeparator()
|
||||
|
@ -17,6 +17,9 @@ func (t TruncatedMarshaller) MarshalJSON() ([]byte, error) {
|
||||
if val.Kind() != reflect.Slice && val.Kind() != reflect.Array {
|
||||
return json.Marshal(t.Value)
|
||||
}
|
||||
if val.Len() == 0 {
|
||||
return []byte("[]"), nil
|
||||
}
|
||||
|
||||
length := val.Len()
|
||||
if length <= t.MaxItems {
|
||||
|
Loading…
x
Reference in New Issue
Block a user