remove deprecated ioutil
This commit is contained in:
parent
aa09649944
commit
e9dee93982
1 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"html"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
@ -42,7 +42,7 @@ func load_toggl_api_key() (string, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
key, err := ioutil.ReadFile(home + "/" + TOGGL_API_KEY_FILE)
|
||||
key, err := os.ReadFile(home + "/" + TOGGL_API_KEY_FILE)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ func get_current_toggl_project() string {
|
|||
return "toggl projectRequest error"
|
||||
}
|
||||
|
||||
body, err = ioutil.ReadAll(resp.Body)
|
||||
body, err = io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return "toggl projectRequest body error"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue