chore: update golangci-lint config

This commit is contained in:
Steven
2023-09-17 22:55:13 +08:00
parent 9eb077c4af
commit cd0ea6558d
72 changed files with 272 additions and 187 deletions

View File

@@ -7,6 +7,8 @@ import (
"strings"
"time"
"github.com/pkg/errors"
"github.com/usememos/memos/common/util"
)
@@ -244,7 +246,7 @@ func (s *Store) ListMemos(ctx context.Context, find *FindMemo) ([]*Memo, error)
for _, relatedMemoType := range relatedMemoTypeList {
relatedMemoTypeList := strings.Split(relatedMemoType, ":")
if len(relatedMemoTypeList) != 2 {
return nil, fmt.Errorf("invalid relation format")
return nil, errors.Errorf("invalid relation format")
}
relatedMemoID, err := util.ConvertStringToInt32(relatedMemoTypeList[0])
if err != nil {