style: fix golangci-lint issues in memo_service.go

- Replace 'else {if}' with 'else if' (gocritic)
- Fix multi-line condition indentation (goimports)
This commit is contained in:
Claude 2025-11-08 01:36:32 +00:00
parent 652c855145
commit 9fcf654b40
No known key found for this signature in database

View file

@ -34,12 +34,10 @@ func (s *APIV1Service) CreateMemo(ctx context.Context, request *v1pb.CreateMemoR
memoUID := strings.TrimSpace(request.MemoId)
if memoUID == "" {
memoUID = shortuuid.New()
} else {
} else if !base.UIDMatcher.MatchString(memoUID) {
// Validate custom memo ID format
if !base.UIDMatcher.MatchString(memoUID) {
return nil, status.Errorf(codes.InvalidArgument, "invalid memo_id format: must be 1-32 characters, alphanumeric and hyphens only, cannot start or end with hyphen")
}
}
create := &store.Memo{
UID: memoUID,