Skip to content

Commit

Permalink
chore: Use toml.NewDecoder instead of the deprecated toml.DecodeReader
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasdietrich committed Mar 4, 2024
1 parent da1b170 commit 1851ac7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func (c *Cache) load() error {
slog.Debug("reading cache", slog.String("filename", c.filename))

defer f.Close()
_, err = toml.DecodeReader(f, &c.entries)
_, err = toml.NewDecoder(f).Decode(&c.entries)
return err

}

func (c *Cache) PersistIfDirty() error {
Expand Down

0 comments on commit 1851ac7

Please sign in to comment.