1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-10-29 15:02:30 +00:00

Apply more mechanical simplifications using recent Go features

This is a follow-up on the `go fix` run in commit
0210c5fd92.

That commit recorded the automated updates.

This one applies further simplifications that are mechanical and do not
involve logic changes, but are outside of what `go fix` did.

It also removes some now-obsolete comments and statements.
This commit is contained in:
Alberto Bertogli
2026-10-03 09:08:22 +01:00
parent 0210c5fd92
commit 8d763f450d
33 changed files with 99 additions and 161 deletions
+3 -1
View File
@@ -2,6 +2,8 @@
package protoio
import (
"errors"
"io/fs"
"net/url"
"os"
"strings"
@@ -87,7 +89,7 @@ func (s *Store) Put(id string, m proto.Message) error {
// Get a message from the store.
func (s *Store) Get(id string, m proto.Message) (bool, error) {
err := ReadTextMessage(s.idToFname(id), m)
if os.IsNotExist(err) {
if errors.Is(err, fs.ErrNotExist) {
return false, nil
}
return err == nil, err