]> Sergey Matveev's repositories - tofuproxy.git/blobdiff - netrc.go
Restricted CAs
[tofuproxy.git] / netrc.go
index d8877b4b9f41005f443f30937ed4ebdcb1cbe719..bdc61bb46fca4ed7d720495e00ba82c79ea29820 100644 (file)
--- a/netrc.go
+++ b/netrc.go
@@ -3,6 +3,8 @@
 package tofuproxy
 
 import (
+       "errors"
+       "io/fs"
        "log"
        "os"
        "path/filepath"
@@ -20,7 +22,7 @@ func findInNetrc(host string) (string, string) {
        }
        data, err := os.ReadFile(netrcPath)
        if err != nil {
-               if os.IsNotExist(err) {
+               if errors.Is(err, fs.ErrNotExist) {
                        return "", ""
                }
                log.Fatalln(err)