Skip to content

Commit

Permalink
lint: remove dead code
Browse files Browse the repository at this point in the history
according to golint-ci, and confirmed by `git grep`, this code
was lingering around unused. Let's get rid of it.

Signed-off-by: Francesco Romani <fromani@redhat.com>
  • Loading branch information
ffromani committed Nov 19, 2021
1 parent 8b732cd commit 35611d6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 30 deletions.
6 changes: 0 additions & 6 deletions cmd/ghw-snapshot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ import (
)

var (
// version of application at compile time (-X 'main.version=$(VERSION)').
version = "(Unknown Version)"
// buildHash GIT hash of application at compile time (-X 'main.buildHash=$(GITCOMMIT)').
buildHash = "No Git-hash Provided."
// buildDate of application at compile time (-X 'main.buildDate=$(BUILDDATE)').
buildDate = "No Build Date Provided."
// show debug output
debug = false
// output filepath to save snapshot to
Expand Down
15 changes: 0 additions & 15 deletions pkg/block/block_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,18 +457,3 @@ func parseMountEntry(line string) *mountEntry {
res.Options = opts
return res
}

func partitionMountPoint(paths *linuxpath.Paths, part string) string {
mp, _, _ := partitionInfo(paths, part)
return mp
}

func partitionType(paths *linuxpath.Paths, part string) string {
_, pt, _ := partitionInfo(paths, part)
return pt
}

func partitionIsReadOnly(paths *linuxpath.Paths, part string) bool {
_, _, ro := partitionInfo(paths, part)
return ro
}
7 changes: 0 additions & 7 deletions pkg/pci/pci.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ package pci
import (
"encoding/json"
"fmt"
"regexp"

"github.com/jaypipes/pcidb"

Expand All @@ -27,12 +26,6 @@ type Address pciaddr.Address
// backward compatibility, to be removed in 1.0.0
var AddressFromString = pciaddr.FromString

var (
regexAddress *regexp.Regexp = regexp.MustCompile(
`^(([0-9a-f]{0,4}):)?([0-9a-f]{2}):([0-9a-f]{2})\.([0-9a-f]{1})$`,
)
)

type Device struct {
// The PCI address of the device
Address string `json:"address"`
Expand Down
3 changes: 1 addition & 2 deletions pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import (
)

const (
UNKNOWN = "unknown"
disableWarningsEnv = "GHW_DISABLE_WARNINGS"
UNKNOWN = "unknown"
)

type closer interface {
Expand Down

0 comments on commit 35611d6

Please sign in to comment.