Skip to content

Commit 11b9587

Browse files
Lukáš Hellmannl-hellmann
authored andcommitted
fix: add nolint directive where necessary
1 parent 48d384f commit 11b9587

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/cmdRunner/execCmd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ func CommandContext(ctx context.Context, cmd string, args ...string) *ExecCmd {
1616

1717
type ExecCmd struct {
1818
*exec.Cmd
19+
//nolint:containedctx
1920
ctx context.Context
2021
before Func
2122
after Func

src/wg/windows.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func beforeUp(zeropsConfPath string) cmdRunner.Func {
6666
wgConfigDir := filepath.Join(programFiles, "WireGuard", "Data", "Configurations")
6767
stat, err := os.Stat(wgConfigDir)
6868
if err != nil {
69+
//nolint:nilerr
6970
return nil
7071
}
7172
if !stat.IsDir() {
@@ -79,20 +80,23 @@ func beforeUp(zeropsConfPath string) cmdRunner.Func {
7980

8081
wgConf, err := os.OpenFile(filepath.Join(wgConfigDir, constants.WgConfigFile), os.O_WRONLY|os.O_CREATE, 0666)
8182
if err != nil {
83+
//nolint:nilerr
8284
return nil
8385
}
8486
defer wgConf.Close()
8587

8688
zeropsConf, err := os.OpenFile(zeropsConfPath, os.O_RDONLY, 0666)
8789
if err != nil {
8890
_ = os.Remove(wgConfFile)
91+
//nolint:nilerr
8992
return nil
9093
}
9194
defer zeropsConf.Close()
9295

9396
_, err = io.Copy(wgConf, zeropsConf)
9497
if err != nil {
9598
_ = os.Remove(wgConfFile)
99+
//nolint:nilerr
96100
return nil
97101
}
98102

0 commit comments

Comments
 (0)