Lint: replace ioutil with os package

This commit is contained in:
Dan Sosedoff
2022-11-14 15:47:36 -06:00
parent 685c222b9d
commit c706523bd0
2 changed files with 4 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ package bookmarks
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
@@ -46,7 +46,7 @@ func (b Bookmark) ConvertToOptions() command.Options {
func readServerConfig(path string) (Bookmark, error) {
bookmark := Bookmark{}
buff, err := ioutil.ReadFile(path)
buff, err := os.ReadFile(path)
if err != nil {
return bookmark, err
}
@@ -100,7 +100,7 @@ func Path(overrideDir string) string {
func ReadAll(path string) (map[string]Bookmark, error) {
results := map[string]Bookmark{}
files, err := ioutil.ReadDir(path)
files, err := os.ReadDir(path)
if err != nil {
return results, err
}

View File

@@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"net/url"
@@ -54,7 +53,7 @@ func fileExists(path string) bool {
}
func parsePrivateKey(keyPath string, keyPass string) (ssh.Signer, error) {
buff, err := ioutil.ReadFile(keyPath)
buff, err := os.ReadFile(keyPath)
if err != nil {
return nil, err
}