Skip to content

Commit 4014e58

Browse files
mariasharamprice
andcommitted
Fix linting errors
Signed-off-by: Aram Price <aram.price@broadcom.com> Co-authored-by: Aram Price <aram.price@broadcom.com>
1 parent ad27aa1 commit 4014e58

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

handler/common_event_format.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (cef concreteCommonEventFormat) ProduceHTTPRequestEventLog(request *http.Re
5252
var buffer bytes.Buffer
5353

5454
buffer.WriteString(extension)
55-
buffer.WriteString(fmt.Sprintf("cs4=%s cs4Label=statusReason", respBody))
55+
buffer.WriteString(fmt.Sprintf("cs4=%s cs4Label=statusReason", respBody)) //nolint:staticcheck
5656
extension = buffer.String()
5757
}
5858

@@ -73,7 +73,7 @@ func (cef concreteCommonEventFormat) ProduceNATSRequestEventLog(addr string, por
7373
var buffer bytes.Buffer
7474

7575
buffer.WriteString(extension)
76-
buffer.WriteString(fmt.Sprintf("cs1=%s cs1Label=statusReason", respBody))
76+
buffer.WriteString(fmt.Sprintf("cs1=%s cs1Label=statusReason", respBody)) //nolint:staticcheck
7777
extension = buffer.String()
7878
}
7979

monitaccess/monit_access_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func EnableMonitAccess(logger boshlog.Logger, command string, args []string) {
2727
if err != nil {
2828
os.Exit(1)
2929
}
30-
defer mgr.Cleanup()
30+
defer mgr.Cleanup() //nolint:errcheck
3131
os.Exit(0)
3232
}
3333

@@ -40,7 +40,7 @@ func EnableMonitAccess(logger boshlog.Logger, command string, args []string) {
4040
logger.Error(command, "Failed to create firewall manager: %v", err)
4141
os.Exit(1)
4242
}
43-
defer mgr.Cleanup()
43+
defer mgr.Cleanup() //nolint:errcheck
4444

4545
// Setup mode: add firewall rule
4646
logger.Info(command, "Setting up monit firewall rule")

monitaccess/monit_access_windows.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ package monitaccess
33
import (
44
"fmt"
55
"os"
6+
7+
boshlog "github.com/cloudfoundry/bosh-utils/logger"
68
)
79

8-
func EnableMonitAccess(command string, args []string) {
10+
func EnableMonitAccess(logger boshlog.Logger, command string, args []string) {
911
fmt.Fprintf(os.Stderr, "enable-monit-access: not implemented for windows")
1012
os.Exit(1)
1113
}

platform/firewall/nftables_firewall_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,6 @@ var _ = Describe("NftablesFirewall", func() {
277277
err := manager.EnableMonitAccess()
278278
Expect(err).To(HaveOccurred())
279279
Expect(err.Error()).To(ContainSubstring("bosh_agent table not found"))
280-
})
281-
282-
It("does not add any rules", func() {
283-
_ = manager.EnableMonitAccess()
284280
Expect(fakeConn.AddRuleCallCount()).To(Equal(0))
285281
})
286282
})

0 commit comments

Comments
 (0)