Ray Tien 3 weeks ago committed by GitHub
commit fead1ac8da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      collector/filesystem_linux.go

@ -16,7 +16,6 @@
package collector
import (
"bytes"
"errors"
"fmt"
"log/slog"
@ -237,13 +236,13 @@ func isFilesystemReadOnly(labels filesystemLabels) bool {
}
func mountOptionsString(m map[string]string) string {
b := new(bytes.Buffer)
var parts []string
for key, value := range m {
if value == "" {
fmt.Fprintf(b, "%s", key)
parts = append(parts, key)
} else {
fmt.Fprintf(b, "%s=%s", key, value)
parts = append(parts, key+"="+value)
}
}
return b.String()
return strings.Join(parts, ",")
}

Loading…
Cancel
Save