Skip to content

Commit

Permalink
Don't initialize var with default value
Browse files Browse the repository at this point in the history
  • Loading branch information
raharper authored and Scott Moser committed Dec 17, 2021
1 parent ced5948 commit 717a967
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions linux/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (
)

// ErrNoPartitionTable is returned if there is no partition table.
var ErrNoPartitionTable error = errors.New("no Partition Table Found")
var ErrNoPartitionTable = errors.New("no Partition Table Found")

// nolint: gochecknoglobals
var xenbusSysPathMatch = regexp.MustCompile(`/devices/vbd-\d+/block/`)
Expand Down Expand Up @@ -271,7 +271,7 @@ func getSysPathForBlockDevicePath(dev string) (string, error) {
// Return the path in /sys/class/block/<device> for a given
// block device kname or path.
var syspath string
var sysdir string = "/sys/class/block"
var sysdir = "/sys/class/block"

if strings.Contains(dev, "/") {
// after symlink resolution, devpath = '/dev/sda' or '/dev/sdb1'
Expand Down

0 comments on commit 717a967

Please sign in to comment.