Removed deprecated package io/ioutil

This commit is contained in:
Cristian Maglie
2024-02-20 15:13:12 +01:00
parent 92703ecb02
commit bcd8695df4

View File

@@ -10,7 +10,7 @@ package serial
import ( import (
"fmt" "fmt"
"io/ioutil" "os"
"regexp" "regexp"
"strings" "strings"
"sync" "sync"
@@ -292,7 +292,7 @@ func nativeOpen(portName string, mode *Mode) (*unixPort, error) {
} }
func nativeGetPortsList() ([]string, error) { func nativeGetPortsList() ([]string, error) {
files, err := ioutil.ReadDir(devFolder) files, err := os.ReadDir(devFolder)
if err != nil { if err != nil {
return nil, err return nil, err
} }