go format code changes

This commit is contained in:
cortze 2023-05-17 14:44:19 +02:00
parent c2e2725855
commit d400d33b1e
2 changed files with 6 additions and 6 deletions

View File

@ -381,9 +381,9 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) {
allowTopics = append(allowTopics, drandTopics...)
options = append(options,
pubsub.WithSubscriptionFilter(
pubsub.WrapLimitSubscriptionFilter(
pubsub.NewAllowlistSubscriptionFilter(allowTopics...),
100)))
pubsub.WrapLimitSubscriptionFilter(
pubsub.NewAllowlistSubscriptionFilter(allowTopics...),
100)))
var transports []tracer.TracerTransport
if in.Cfg.JsonTracer != "" {
@ -505,7 +505,7 @@ func (trw *tracerWrapper) Trace(evt *pubsub_pb.TraceEvent) {
case pubsub_pb.TraceEvent_DELIVER_MESSAGE:
stats.Record(context.TODO(), metrics.PubsubDeliverMessage.M(1))
case pubsub_pb.TraceEvent_REJECT_MESSAGE:
stats.Record(context.TODO(), metrics.PubsubRejectMessage.M(1))
if trw.traceMessage(evt.GetRejectMessage().GetTopic()) {

View File

@ -1,7 +1,7 @@
package tracer
import (
"io/ioutil"
"io"
"net/http"
"strings"
@ -68,7 +68,7 @@ func (t *FastHttpTransport) copyResponse(dst *http.Response, src *fasthttp.Respo
// Cast to a string to make a copy seeing as src.Body() won't
// be valid after the response is released back to the pool (fasthttp.ReleaseResponse).
dst.Body = ioutil.NopCloser(strings.NewReader(string(src.Body())))
dst.Body = io.NopCloser(strings.NewReader(string(src.Body())))
return dst
}