Skip to content

Commit

Permalink
Linter fixes and configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
vokomarov committed Mar 8, 2020
1 parent a581c9a commit 7038f88
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
service:
analyzed-paths:
- scanner/...
golangci-lint-version: 1.12.x
golangci-lint-version: 1.23.x
prepare:
- sudo apt-get install libpcap-dev
- apt-get update && apt-get install -y libpcap-dev
suggested-changes:
disabled: true
1 change: 1 addition & 0 deletions hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type hostsCommand struct {
Timeout int `short:"t" long:"timeout" default:"5" description:"Timeout in seconds to wait for ARP responses."`
}

// Execute will run the command
func (c *hostsCommand) Execute(_ []string) error {
fmt.Printf("Scanning Hosts..\n")

Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ func main() {
if flagsErr, ok := err.(*flags.Error); ok && flagsErr.Type == flags.ErrHelp {
os.Exit(0)
return
} else {
fmt.Printf("Error: %v\n", err)
os.Exit(1)
return
}

fmt.Printf("Error: %v\n", err)
os.Exit(1)
return
}

os.Exit(0)
Expand Down
1 change: 1 addition & 0 deletions ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
type portsCommand struct {
}

// Execute will run the command
func (c *portsCommand) Execute(_ []string) error {
fmt.Printf("Scanning Ports..\n")
return nil
Expand Down

0 comments on commit 7038f88

Please sign in to comment.