Selaa lähdekoodia

Function name uppdate

Vladimir Vivien 3 vuotta sitten
vanhempi
commit
ba8c73f293
2 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 2 1
      v4l2/device/list.go
  2. 1 1
      v4l2/device/list_test.go

+ 2 - 1
v4l2/device/list.go

@@ -32,7 +32,8 @@ func IsDevice(devpath string) (bool, error) {
 	return false, nil
 }
 
-func List() ([]string, error) {
+// GetAllDevicePaths return a slice of all mounted v4l2 devices
+func GetAllDevicePaths() ([]string, error) {
 	entries, err := os.ReadDir(root)
 	if err != nil {
 		return nil, err

+ 1 - 1
v4l2/device/list_test.go

@@ -5,7 +5,7 @@ import (
 )
 
 func TestList(t *testing.T){
-	devices, err := List()
+	devices, err := GetAllDevicePaths()
 	if err != nil {
 		t.Error(err)
 	}