1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-14 14:42:25 +00:00

refactor: modernize Go code

This commit is contained in:
Oleksandr Redko
2026-01-06 11:52:05 +02:00
parent 62ef283943
commit 158af1e1ba
12 changed files with 55 additions and 119 deletions

View File

@@ -156,7 +156,7 @@ func isExternalDisk(device string) (bool, error) {
found bool
external bool
)
for _, line := range strings.Split(out, "\n") {
for line := range strings.Lines(out) {
trim := strings.TrimSpace(line)
if strings.HasPrefix(trim, "Internal:") {
found = true