diff --git a/config/config.go b/config/config.go index 1927fe7..c8a4be0 100644 --- a/config/config.go +++ b/config/config.go @@ -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() diff --git a/utils/convert.go b/utils/convert.go index 76bf424..21e7a92 100644 --- a/utils/convert.go +++ b/utils/convert.go @@ -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 {