Skip to content

Commit

Permalink
refactor: refactor file reading to use os package methods
Browse files Browse the repository at this point in the history
- Replace `ioutil.ReadFile` with `os.ReadFile` for file reading

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Mar 31, 2023
1 parent 44e94a0 commit ce1a5f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"errors"
"io/ioutil"
"log"
"os"
"path/filepath"
Expand Down Expand Up @@ -158,7 +157,7 @@ func (p Plugin) Exec() error {
}

if p.Config.ZipFile != "" {
contents, err := ioutil.ReadFile(p.Config.ZipFile)
contents, err := os.ReadFile(p.Config.ZipFile)
if err != nil {
return err
}
Expand Down

0 comments on commit ce1a5f6

Please sign in to comment.