refactor: replace OpenFile with Open

This commit is contained in:
lilong.129
2025-05-07 16:40:39 +08:00
parent 5e9fca046a
commit 81f29cdef5
7 changed files with 8 additions and 8 deletions

View File

@@ -493,7 +493,7 @@ func RunCommandWithCallback(cmdName string, args []string, callback LineCallback
// LoadImage loads image file and returns base64 encoded string and image size
func LoadImage(imagePath string) (base64Str string, size types.Size, err error) {
// Read the image file
imageFile, err := os.OpenFile(imagePath, os.O_RDONLY, 0o600)
imageFile, err := os.Open(imagePath)
if err != nil {
return "", types.Size{}, fmt.Errorf("failed to open image file: %w", err)
}

View File

@@ -1 +1 @@
v5.0.0-beta-2505060057
v5.0.0-beta-2505071640