chore: standardize context keys with custom ContextKey type (#697)

* chore: standardize context keys with custom ContextKey type

* fix bug

* 使用Request.Context
This commit is contained in:
j2rong4cn
2025-07-14 23:55:17 +08:00
committed by GitHub
parent 2a4c546a8b
commit 0c461991f9
51 changed files with 253 additions and 219 deletions

View File

@ -173,19 +173,6 @@ func (d *Local) FileInfoToObj(ctx context.Context, f fs.FileInfo, reqPath string
}
return &file
}
func (d *Local) GetMeta(ctx context.Context, path string) (model.Obj, error) {
f, err := os.Stat(path)
if err != nil {
return nil, err
}
file := d.FileInfoToObj(ctx, f, path, path)
//h := "123123"
//if s, ok := f.(model.SetHash); ok && file.GetHash() == ("","") {
// s.SetHash(h,"SHA1")
//}
return file, nil
}
func (d *Local) Get(ctx context.Context, path string) (model.Obj, error) {
path = filepath.Join(d.GetRootPath(), path)