mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
lint by golangci-lint (#3080)
This commit is contained in:
@@ -9,7 +9,10 @@ import (
|
||||
|
||||
func WriteBytes(w io.Writer, buf []byte) (int, error) {
|
||||
out := bytes.NewBuffer(nil)
|
||||
binary.Write(out, binary.BigEndian, int64(len(buf)))
|
||||
if err := binary.Write(out, binary.BigEndian, int64(len(buf))); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
out.Write(buf)
|
||||
return w.Write(out.Bytes())
|
||||
}
|
||||
|
Reference in New Issue
Block a user