mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-09-05 16:47:31 -04:00
Fix linting issues: remove redundant build tags and use errors.New
Signed-off-by: Varun Gokulnath <vagokuln@microsoft.com> Signed-off-by: Varun Gokulnath <gvarun22@outlook.com>
This commit is contained in:
committed by
Varun Gokulnath
parent
94113a48c2
commit
3ffe560692
+2
-2
@@ -1,11 +1,11 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package winio
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"unicode/utf16"
|
||||
@@ -61,7 +61,7 @@ func DecodeReparsePointData(tag uint32, b []byte) (*ReparsePoint, error) {
|
||||
case reparseTagLxSymlink:
|
||||
// LX symlinks store the target as UTF-8 after a 4-byte version field
|
||||
if len(b) < 4 {
|
||||
return nil, fmt.Errorf("LX symlink buffer too short")
|
||||
return nil, errors.New("LX symlink buffer too short")
|
||||
}
|
||||
targetBytes := b[4:]
|
||||
for i, c := range targetBytes {
|
||||
|
||||
Reference in New Issue
Block a user