重构项目

This commit is contained in:
dragon
2025-11-12 13:50:38 +08:00
parent dd6b50ba9c
commit adb9bf25b8
11 changed files with 217 additions and 257 deletions

View File

@@ -73,3 +73,11 @@ func (p *PageVFS) Read(ctx context.Context, path string) ([]byte, error) {
defer open.Close()
return io.ReadAll(open)
}
func (p *PageVFS) ReadString(ctx context.Context, path string) (string, error) {
read, err := p.Read(ctx, path)
if err != nil {
return "", err
}
return string(read), nil
}