Add linters and fix lint issues

This commit is contained in:
Quentin McGaw
2020-10-20 02:45:28 +00:00
parent f9bef8ecda
commit 9c73faaaeb
107 changed files with 739 additions and 422 deletions

View File

@@ -51,7 +51,7 @@ func (c *configurator) disable(ctx context.Context) (err error) {
return nil
}
// To use in defered call when enabling the firewall
// To use in defered call when enabling the firewall.
func (c *configurator) fallbackToDisabled(ctx context.Context) {
if ctx.Err() != nil {
return
@@ -61,7 +61,7 @@ func (c *configurator) fallbackToDisabled(ctx context.Context) {
}
}
func (c *configurator) enable(ctx context.Context) (err error) { //nolint:gocognit
func (c *configurator) enable(ctx context.Context) (err error) {
if err = c.setAllPolicies(ctx, "DROP"); err != nil {
return fmt.Errorf("cannot enable firewall: %w", err)
}