mirror of
https://github.com/lingble/talos.git
synced 2025-11-01 21:17:54 +00:00
chore: code cleanup
More usage of slices package, less usage of package sort. Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"slices"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -212,9 +213,8 @@ func (a *APID) AppendInfo(streaming bool, resp []byte) ([]byte, error) {
|
||||
protowire.AppendVarint(nil, (metadataField<<3)|metadataType),
|
||||
uint64(len(resp)+len(payload)),
|
||||
)
|
||||
resp = append(prefix, resp...)
|
||||
|
||||
return append(resp, payload...), err
|
||||
return slices.Concat(prefix, resp, payload), err
|
||||
}
|
||||
|
||||
// BuildError is called to convert error from upstream into response field.
|
||||
|
||||
Reference in New Issue
Block a user