mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
fix goimports
This commit is contained in:
parent
008ecab4d7
commit
637444cafb
2 changed files with 10 additions and 12 deletions
|
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
|
|
@ -314,12 +313,12 @@ func fetchFeed(topic string, user string, endpoint string, original []byte, ruid
|
|||
req, _ := http.NewRequest("GET", reqUri, nil)
|
||||
trace := &httptrace.ClientTrace{
|
||||
GetConn: func(_ string) { log.Trace("http get request (feed) - GetConn") },
|
||||
GotConn: func(_GotConnInfo) { log.Trace("http get request (feed) - GotConn") },
|
||||
GotConn: func(_ httptrace.GotConnInfo) { log.Trace("http get request (feed) - GotConn") },
|
||||
PutIdleConn: func(err error) { log.Trace("http get request (feed) - PutIdleConn", "err", err) },
|
||||
GotFirstResponseByte: func() { log.Trace("http get request (feed) - GotFirstResponseByte") },
|
||||
Got100Continue: func() { log.Trace("http get request (feed) - Got100Continue") },
|
||||
DNSStart: func(_ DNSStartInfo) { log.Trace("http get request (feed) - DNSStart") },
|
||||
DNSDone: func(_ DNSDoneInfo) { log.Trace("http get request (feed) - DNSDone") },
|
||||
DNSStart: func(_ httptrace.DNSStartInfo) { log.Trace("http get request (feed) - DNSStart") },
|
||||
DNSDone: func(_ httptrace.DNSDoneInfo) { log.Trace("http get request (feed) - DNSDone") },
|
||||
ConnectStart: func(network, addr string) {
|
||||
log.Trace("http get request (feed) - ConnectStart", "network", network, "addr", addr)
|
||||
},
|
||||
|
|
@ -330,11 +329,11 @@ func fetchFeed(topic string, user string, endpoint string, original []byte, ruid
|
|||
WroteHeaders: func() { log.Trace("http get request (feed) - WroteHeaders(request)") },
|
||||
Wait100Continue: func() { log.Trace("http get request (feed) - Wait100Continue") },
|
||||
|
||||
WroteRequest: func(_ WroteRequestInfo) { log.Trace("http get request (feed) - WroteRequest") },
|
||||
WroteRequest: func(_ httptrace.WroteRequestInfo) { log.Trace("http get request (feed) - WroteRequest") },
|
||||
}
|
||||
req = req.WithContext(httptrace.WithClientTrace(req.Context(), trace))
|
||||
transport := http.DefaultTransport
|
||||
transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
//transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
|
||||
res, err := transport.RoundTrip(req)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import (
|
|||
"bytes"
|
||||
"crypto/md5"
|
||||
crand "crypto/rand"
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
|
@ -145,12 +144,12 @@ func fetch(hash string, endpoint string, original []byte, ruid string) error {
|
|||
req, _ := http.NewRequest("GET", reqUri, nil)
|
||||
trace := &httptrace.ClientTrace{
|
||||
GetConn: func(_ string) { log.Trace("http get request - GetConn") },
|
||||
GotConn: func(_GotConnInfo) { log.Trace("http get request - GotConn") },
|
||||
GotConn: func(_ httptrace.GotConnInfo) { log.Trace("http get request - GotConn") },
|
||||
PutIdleConn: func(err error) { log.Trace("http get request - PutIdleConn", "err", err) },
|
||||
GotFirstResponseByte: func() { log.Trace("http get request - GotFirstResponseByte") },
|
||||
Got100Continue: func() { log.Trace("http get request - Got100Continue") },
|
||||
DNSStart: func(_ DNSStartInfo) { log.Trace("http get request - DNSStart") },
|
||||
DNSDone: func(_ DNSDoneInfo) { log.Trace("http get request - DNSDone") },
|
||||
DNSStart: func(_ httptrace.DNSStartInfo) { log.Trace("http get request - DNSStart") },
|
||||
DNSDone: func(_ httptrace.DNSDoneInfo) { log.Trace("http get request - DNSDone") },
|
||||
ConnectStart: func(network, addr string) {
|
||||
log.Trace("http get request - ConnectStart", "network", network, "addr", addr)
|
||||
},
|
||||
|
|
@ -160,11 +159,11 @@ func fetch(hash string, endpoint string, original []byte, ruid string) error {
|
|||
WroteHeaders: func() { log.Trace("http get request - WroteHeaders(request)") },
|
||||
Wait100Continue: func() { log.Trace("http get request - Wait100Continue") },
|
||||
|
||||
WroteRequest: func(_ WroteRequestInfo) { log.Trace("http get request - WroteRequest") },
|
||||
WroteRequest: func(_ httptrace.WroteRequestInfo) { log.Trace("http get request - WroteRequest") },
|
||||
}
|
||||
req = req.WithContext(httptrace.WithClientTrace(req.Context(), trace))
|
||||
transport := http.DefaultTransport
|
||||
transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
//transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
|
||||
res, err := transport.RoundTrip(req)
|
||||
if err != nil {
|
||||
log.Error(err.Error(), "ruid", ruid)
|
||||
|
|
|
|||
Loading…
Reference in a new issue