mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-03 06:49:38 +08:00
refactor: replace OpenFile with Open
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
v5.0.0-beta-2505060057
|
||||
v5.0.0-beta-2505071640
|
||||
|
||||
Reference in New Issue
Block a user