Simplify make() (gosimple)

This fixes:
benchmark/worker/benchmark_client.go:151:36: should use make([]*grpc.ClientConn, connCount) instead (S1019)
benchmark/worker/benchmark_client.go:231:47: should use make([]lockingHistogram, rpcCountPerConn * len(conns)) instead (S1019)
benchmark/worker/benchmark_client.go:343:39: should use make([]*stats.Histogram, len(bc.lockingHistograms)) instead (S1019)
benchmark/worker/benchmark_client.go:369:22: should use make([]uint32, len(mergedHistogram.Buckets)) instead (S1019)
encoding/encoding.go:85:47: should use make(map[string]Codec) instead (S1019)
proxy_test.go:116:26: should use make([]byte, len(msg)) instead (S1019)
This commit is contained in:
Karsten Weiss
2018-04-15 13:02:09 +02:00
parent 749a0db289
commit 4d9544a0fd
3 changed files with 6 additions and 6 deletions

View File

@ -82,7 +82,7 @@ type Codec interface {
Name() string
}
var registeredCodecs = make(map[string]Codec, 0)
var registeredCodecs = make(map[string]Codec)
// RegisterCodec registers the provided Codec for use with all gRPC clients and
// servers.