From 7fbaf7c6699c9f4c1721473275da3b3d86c0f3bd Mon Sep 17 00:00:00 2001 From: city2011 Date: Tue, 25 Jan 2022 00:28:50 +0800 Subject: [PATCH 1/2] (fix)convert str3 (string) to int word fix --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eabe3f0..4fb7501 100644 --- a/README.md +++ b/README.md @@ -1280,11 +1280,12 @@ int main(){ var num2 float32 = 3.14 // 不能将其它基本类型强制转换为字符串类型 + // Cannot convert an expression of the type 'float32' to the type 'string' var str2 string = string(num2) fmt.Println(str2) var str3 string = "97" - // 不能强制转换, cannot convert str2 (type string) to type int + // 不能强制转换, cannot convert str3 (type string) to type int var num3 int = int(str3) fmt.Println(num3) } From a796db671287873ad605288a555db6aaabdd771a Mon Sep 17 00:00:00 2001 From: city2011 Date: Tue, 25 Jan 2022 00:47:08 +0800 Subject: [PATCH 2/2] (style)text-align --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4fb7501..41119df 100644 --- a/README.md +++ b/README.md @@ -1280,7 +1280,7 @@ int main(){ var num2 float32 = 3.14 // 不能将其它基本类型强制转换为字符串类型 - // Cannot convert an expression of the type 'float32' to the type 'string' + // Cannot convert an expression of the type 'float32' to the type 'string' var str2 string = string(num2) fmt.Println(str2)