chore: fix misuse of package path instead of filepath.path (#2684)

As stated by https://pkg.go.dev/path, "path" is mainly for URLs, "path.filepath" for file systems
This commit is contained in:
Lincoln Nogueira
2023-12-28 20:50:15 -03:00
committed by GitHub
parent 411e807dcc
commit 14b34edca3
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ import (
"bytes"
"context"
"fmt"
"path"
"path/filepath"
"strconv"
"unicode/utf16"
@ -85,7 +85,7 @@ func (t *TelegramHandler) MessageHandle(ctx context.Context, bot *telegram.Bot,
// Fill the common field of create
create := store.Resource{
CreatorID: creatorID,
Filename: path.Base(attachment.FileName),
Filename: filepath.Base(attachment.FileName),
Type: attachment.GetMimeType(),
Size: attachment.FileSize,
MemoID: &memoMessage.ID,