diff options
author | Hank Shen <swh@admpub.com> | 2023-11-29 09:54:10 +0300 |
---|---|---|
committer | Hank Shen <swh@admpub.com> | 2023-11-29 09:54:10 +0300 |
commit | 514d30dd4689230248087fb9edc543a4d6d61121 (patch) | |
tree | 8886850612f587dc8edda05f0a8e6cd5f31cd853 /store.go | |
parent | 2a94acab148e3f71c0cf818bfdbe4fe98cd33874 (diff) |
updatev0.1.4
Diffstat (limited to 'store.go')
-rw-r--r-- | store.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -6,7 +6,6 @@ package sessions import ( "encoding/base32" - "io/ioutil" "os" "path/filepath" "strings" @@ -300,7 +299,7 @@ func (s *FilesystemStore) save(session *Session) error { filename := filepath.Join(s.path, "session_"+session.ID) fileMutex.Lock() defer fileMutex.Unlock() - return ioutil.WriteFile(filename, []byte(encoded), 0600) + return os.WriteFile(filename, []byte(encoded), 0600) } // load reads a file and decodes its content into session.Values. @@ -308,7 +307,7 @@ func (s *FilesystemStore) load(ctx echo.Context, session *Session) error { filename := filepath.Join(s.path, "session_"+session.ID) fileMutex.RLock() defer fileMutex.RUnlock() - fdata, err := ioutil.ReadFile(filename) + fdata, err := os.ReadFile(filename) if err != nil { return err } |