Skip to content

Commit

Permalink
PR: spelling, constants
Browse files Browse the repository at this point in the history
Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
  • Loading branch information
helsaawy committed Aug 22, 2022
1 parent 9b6856b commit fa3af9e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -60,7 +60,7 @@ Alternatively, `golangci-lint` can be [installed locally][lint-install] and run

### Go Generate

The pipeline checks that auto-generated code, via `go generate`, be up to date.
The pipeline checks that auto-generated code, via `go generate`, are up to date.

This can be done for the entire repo:

Expand Down
2 changes: 1 addition & 1 deletion backup.go
Expand Up @@ -39,7 +39,7 @@ const (
//nolint:revive // var-naming: ALL_CAPS
const (
WRITE_DAC = windows.WRITE_DAC
WRITE_OWNER = windows.WRITE_DAC
WRITE_OWNER = windows.WRITE_OWNER
ACCESS_SYSTEM_SECURITY = windows.ACCESS_SYSTEM_SECURITY
)

Expand Down
9 changes: 3 additions & 6 deletions backup_test.go
Expand Up @@ -8,6 +8,8 @@ import (
"os"
"syscall"
"testing"

"golang.org/x/sys/windows"
)

var testFileName string
Expand Down Expand Up @@ -200,12 +202,7 @@ func makeSparseFile() error {
}
defer f.Close()

const (
fsctlSetSparse = 0x000900c4
fsctlSetZeroData = 0x000980c8
)

err = syscall.DeviceIoControl(syscall.Handle(f.Fd()), fsctlSetSparse, nil, 0, nil, 0, nil, nil)
err = syscall.DeviceIoControl(syscall.Handle(f.Fd()), windows.FSCTL_SET_SPARSE, nil, 0, nil, 0, nil, nil)
if err != nil {
return err
}
Expand Down

0 comments on commit fa3af9e

Please sign in to comment.