cleaningup
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
//go:build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func main() {
|
||||
matches, err := filepath.Glob("/sys/class/drm/*/modes")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Println(matches)
|
||||
for _, match := range matches {
|
||||
f, err := os.Open(match)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
r := bufio.NewReader(f)
|
||||
s, err := r.ReadString('\n')
|
||||
if err != nil {
|
||||
switch err {
|
||||
case io.EOF:
|
||||
continue
|
||||
default:
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
fmt.Print(s)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user