chore: fix typos (#2859)

This commit is contained in:
ILoveScratch
2026-07-28 13:18:34 +08:00
committed by GitHub
parent be708292eb
commit cf931d4760
8 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ type options struct {
pwd string //de/encrypt password
salt string
filenameEncryption string //reference drivers\crypt\meta.go Addtion
filenameEncryption string //reference drivers\crypt\meta.go Addition
dirnameEncryption string
filenameEncode string
suffix string
+1 -1
View File
@@ -507,7 +507,7 @@ func (d *Yun139) shareHeaders() map[string]string {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0",
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json;charset=UTF-8",
"X-Deviceinfo": "||9|12.27.0|firefox|140.0|||linux unknow|1920X526|zh-CN|||",
"X-Deviceinfo": "||9|12.27.0|firefox|140.0|||linux unknown|1920X526|zh-CN|||",
"hcy-cool-flag": "1",
"CMS-DEVICE": "default",
"x-m4c-caller": "PC",
+1 -1
View File
@@ -251,7 +251,7 @@ func (d *Crypt) Link(ctx context.Context, file model.Obj, _ model.LinkArgs) (*mo
rrf, err := stream.GetRangeReaderFromLink(remoteSize, remoteLink)
if err != nil {
_ = remoteLink.Close()
return nil, fmt.Errorf("the remote storage driver need to be enhanced to support encrytion")
return nil, fmt.Errorf("the remote storage driver need to be enhanced to support encryption")
}
mu := &sync.Mutex{}
+1 -1
View File
@@ -304,7 +304,7 @@ var findFromReg = regexp.MustCompile(`data : '(.+?)'`) // 查找from字符串
func htmlFormToMap(html string) (map[string]string, error) {
forms := findFromReg.FindStringSubmatch(html)
if len(forms) != 2 {
return nil, fmt.Errorf("not find file sgin")
return nil, fmt.Errorf("not find file sign")
}
return formToMap(forms[1]), nil
}
+2 -2
View File
@@ -132,7 +132,7 @@ type FileOrFolderByShareUrl struct {
//T int `json:"t"`
// 文件夹特有
IsFloder bool `json:"-"`
IsFolder bool `json:"-"`
//
Url string `json:"-"`
@@ -162,7 +162,7 @@ func (f *FileOrFolderByShareUrl) GetSize() int64 {
}
return *f.size
}
func (f *FileOrFolderByShareUrl) IsDir() bool { return f.IsFloder }
func (f *FileOrFolderByShareUrl) IsDir() bool { return f.IsFolder }
func (f *FileOrFolderByShareUrl) ModTime() time.Time {
if f.time == nil {
time := MustParseTime(f.Time)
+6 -6
View File
@@ -572,14 +572,14 @@ func (d *LanZou) getFolderByShareUrl(pwd string, sharePageData string) ([]FileOr
files := make([]FileOrFolderByShareUrl, 0)
// vip获取文件夹
floders := findSubFolderReg.FindAllStringSubmatch(sharePageData, -1)
for _, floder := range floders {
if len(floder) == 3 {
folders := findSubFolderReg.FindAllStringSubmatch(sharePageData, -1)
for _, folder := range folders {
if len(folder) == 3 {
files = append(files, FileOrFolderByShareUrl{
// Pwd: pwd, // 子文件夹不加密
ID: floder[1],
NameAll: floder[2],
IsFloder: true,
ID: folder[1],
NameAll: folder[2],
IsFolder: true,
})
}
}
+1 -1
View File
@@ -95,7 +95,7 @@ func FinishAuthnLogin(c *gin.Context) {
} else { // client-side discoverable login
_, err = authnInstance.FinishDiscoverableLogin(func(_, userHandle []byte) (webauthn.User, error) {
// first param `rawID` in this callback function is equal to ID in webauthn.Credential,
// but it's unnnecessary to check it.
// but it's unnecessary to check it.
// userHandle param is equal to (User).WebAuthnID().
userID := uint(binary.LittleEndian.Uint64(userHandle))
user, err = db.GetUserById(userID)
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"github.com/itsHenry35/gofakes3"
)
// pager splits the object list into smulitply pages.
// pager splits the object list into multiple pages.
func (db *s3Backend) pager(list *gofakes3.ObjectList, page gofakes3.ListBucketPage) (*gofakes3.ObjectList, error) {
// sort by alphabet
sort.Slice(list.CommonPrefixes, func(i, j int) bool {