Skip to content

Commit eb6bea8

Browse files
committedJan 26, 2022
all: make go1.14 compatible
1 parent cbffdb5 commit eb6bea8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎internal/ico/ico.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"image"
1616
"image/png"
1717
"io"
18+
"io/ioutil"
1819

1920
"golang.org/x/image/bmp"
2021
)
@@ -60,7 +61,7 @@ func Decode(r io.Reader) (image.Image, error) {
6061

6162
// discard data until the ImageOffset is reached
6263
discardBytes := entry.ImageOffset - iconHeaderSize - iconEntrieSize*uint32(iconHeader.Count)
63-
if _, err := io.CopyN(io.Discard, r, int64(discardBytes)); err != nil {
64+
if _, err := io.CopyN(ioutil.Discard, r, int64(discardBytes)); err != nil {
6465
return nil, fmt.Errorf("could not discard file data: %s", err)
6566
}
6667

‎internal/paw/storage_os.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package paw
33
import (
44
"errors"
55
"fmt"
6+
"io/ioutil"
67
"os"
78
"path/filepath"
89
)
@@ -206,7 +207,7 @@ func (s *OSStorage) StoreItem(vault *Vault, item Item) error {
206207
// Vaults returns the list of vault names from the storage
207208
func (s *OSStorage) Vaults() ([]string, error) {
208209
root := storageRootPath(s)
209-
dirEntries, err := os.ReadDir(root)
210+
dirEntries, err := ioutil.ReadDir(root)
210211
if err != nil {
211212
return nil, err
212213
}

0 commit comments

Comments
 (0)
Please sign in to comment.