mirror of https://github.com/pkg/sftp.git
Add const for all attribute flags and add missing newline
This commit is contained in:
parent
1bb2f2849b
commit
f94839fd59
3
attrs.go
3
attrs.go
|
@ -15,6 +15,9 @@ const (
|
|||
sshFileXferAttrPermissions = 0x00000004
|
||||
sshFileXferAttrACmodTime = 0x00000008
|
||||
sshFileXferAttrExtented = 0x80000000
|
||||
|
||||
sshFileXferAttrAll = sshFileXferAttrSize|sshFileXferAttrUIDGID|sshFileXferAttrPermissions|
|
||||
sshFileXferAttrACmodTime|sshFileXferAttrExtented
|
||||
)
|
||||
|
||||
// fileInfo is an artificial type designed to satisfy os.FileInfo.
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package sftp
|
||||
|
||||
import (
|
||||
"math"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestRequestPflags(t *testing.T) {
|
||||
|
@ -52,7 +50,7 @@ func TestRequestAttributes(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestRequestAttributesEmpty(t *testing.T) {
|
||||
fs, b := getFileStat(math.MaxUint32, nil)
|
||||
fs, b := getFileStat(sshFileXferAttrAll, nil)
|
||||
assert.Equal(t, &FileStat{
|
||||
Extended: []StatExtended{},
|
||||
}, fs)
|
||||
|
|
Loading…
Reference in New Issue