Skip to content

Commit 583b663

Browse files
committed
Address lint errors
1 parent c42cba1 commit 583b663

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

gofsutil_fs.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,21 @@ func (fs *FS) fsInfo(_ context.Context, path string) (int64, int64, int64, int64
192192
}
193193

194194
// Available is blocks available * fragment size
195-
available := int64(statfs.Bavail) * int64(statfs.Bsize)
195+
// #nosec G115
196+
available := int64(statfs.Bavail) * statfs.Bsize
196197

197198
// Capacity is total block count * fragment size
198-
capacity := int64(statfs.Blocks) * int64(statfs.Bsize)
199+
// #nosec G115
200+
capacity := int64(statfs.Blocks) * statfs.Bsize
199201

200202
// Usage is block being used * fragment size (aka block size).
201-
usage := (int64(statfs.Blocks) - int64(statfs.Bfree)) * int64(statfs.Bsize)
203+
// #nosec G115
204+
usage := (int64(statfs.Blocks) - int64(statfs.Bfree)) * statfs.Bsize
202205

206+
// #nosec G115
203207
inodes := int64(statfs.Files)
208+
209+
// #nosec G115
204210
inodesFree := int64(statfs.Ffree)
205211
inodesUsed := inodes - inodesFree
206212

gofsutil_mount_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ func (fs *FS) multipathCommand(ctx context.Context, timeoutSeconds time.Duration
571571
log.Error("multipath command failed: " + err.Error())
572572
}
573573
if len(textBytes) > 0 {
574-
log.Debug(fmt.Printf("multipath output: " + string(textBytes)))
574+
log.Debug(fmt.Printf("multipath output: %s", string(textBytes)))
575575
}
576576
return textBytes, err
577577
}

0 commit comments

Comments
 (0)