Skip to content

Commit ddfaea0

Browse files
refactor: use helper to derive variable path
1 parent fb17cff commit ddfaea0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type battery struct {
5656
}
5757

5858
func (b *battery) has(variable string) (bool, error) {
59-
_, err := os.Stat(filepath.Join(b.root, variable))
59+
_, err := os.Stat(b.path(variable))
6060
if err != nil {
6161
if errors.Is(err, fs.ErrNotExist) {
6262
return false, nil

0 commit comments

Comments
 (0)