mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 13:40:22 +03:00
Migrate golanglint-ci config to V2 (#21081)
This commit is contained in:
@@ -466,19 +466,14 @@ func benchmarkGridStreamTwoway(b *testing.B, n int) {
|
||||
// Send 10x requests.
|
||||
Handle: func(ctx context.Context, payload []byte, in <-chan []byte, out chan<- []byte) *RemoteErr {
|
||||
got := 0
|
||||
for {
|
||||
select {
|
||||
case b, ok := <-in:
|
||||
if !ok {
|
||||
if got != messages {
|
||||
return NewRemoteErrf("wrong number of requests. want %d, got %d", messages, got)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
out <- b
|
||||
got++
|
||||
}
|
||||
for b := range in {
|
||||
out <- b
|
||||
got++
|
||||
}
|
||||
if got != messages {
|
||||
return NewRemoteErrf("wrong number of requests. want %d, got %d", messages, got)
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
||||
Subroute: "some-subroute",
|
||||
|
||||
@@ -1511,7 +1511,6 @@ func (c *Connection) handlePing(ctx context.Context, m message) {
|
||||
pong := pongMsg{NotFound: true, T: ping.T}
|
||||
gridLogIf(ctx, c.queueMsg(m, &pong))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Connection) handleDisconnectClientMux(m message) {
|
||||
|
||||
@@ -192,7 +192,7 @@ func bytesOrLength(b []byte) string {
|
||||
if len(b) > 100 {
|
||||
return fmt.Sprintf("%d bytes", len(b))
|
||||
}
|
||||
return fmt.Sprint(b)
|
||||
return fmt.Sprint(string(b))
|
||||
}
|
||||
|
||||
// ConnDialer is a function that dials a connection to the given address.
|
||||
|
||||
@@ -387,15 +387,14 @@ func (u *URLValues) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
||||
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
||||
func (u URLValues) Msgsize() (s int) {
|
||||
s = msgp.MapHeaderSize
|
||||
if u != nil {
|
||||
for zb0006, zb0007 := range u {
|
||||
_ = zb0007
|
||||
s += msgp.StringPrefixSize + len(zb0006) + msgp.ArrayHeaderSize
|
||||
for zb0008 := range zb0007 {
|
||||
s += msgp.StringPrefixSize + len(zb0007[zb0008])
|
||||
}
|
||||
for zb0006, zb0007 := range u {
|
||||
_ = zb0007
|
||||
s += msgp.StringPrefixSize + len(zb0006) + msgp.ArrayHeaderSize
|
||||
for zb0008 := range zb0007 {
|
||||
s += msgp.StringPrefixSize + len(zb0007[zb0008])
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user