From ff11b685aec2eef5eb33fcd11b4d388988856736 Mon Sep 17 00:00:00 2001 From: zouhuigang <952750120@qq.com> Date: Thu, 13 Jun 2019 23:00:19 +0800 Subject: [PATCH] fix undefined: strings.ReplaceAll --- messagebox.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messagebox.go b/messagebox.go index 5386d319..b3152b28 100644 --- a/messagebox.go +++ b/messagebox.go @@ -59,7 +59,7 @@ func MsgBox(owner Form, title, message string, style MsgBoxStyle) int { return int(win.MessageBox( ownerHWnd, - syscall.StringToUTF16Ptr(strings.ReplaceAll(message, "\x00", "␀")), - syscall.StringToUTF16Ptr(strings.ReplaceAll(title, "\x00", "␀")), + syscall.StringToUTF16Ptr(strings.Replace(message, "\x00", "␀", -1)), + syscall.StringToUTF16Ptr(strings.Replace(title, "\x00", "␀", -1)), uint32(style))) }