diff --git a/doc/go_spec.html b/doc/go_spec.html index bb5b2f3db9..6e735e4373 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -5587,21 +5587,6 @@ succeeds but the result value is implementation-dependent.
"\uFFFD".
-
-
-string('a') // "a"
-string(-1) // "\ufffd" == "\xef\xbf\xbd"
-string(0xf8) // "\u00f8" == "ø" == "\xc3\xb8"
-
-type myString string
-myString(0x65e5) // "\u65e5" == "日" == "\xe6\x97\xa5"
-
-"\uFFFD".
+
+
+string('a') // "a"
+string(65) // "A"
+string('\xf8') // "\u00f8" == "ø" == "\xc3\xb8"
+string(-1) // "\ufffd" == "\xef\xbf\xbd"
+
+type myString string
+myString('\u65e5') // "\u65e5" == "日" == "\xe6\x97\xa5"
+
+
+Note: This form of conversion may eventually be removed from the language.
+The go vet tool flags certain
+integer-to-string conversions as potential errors.
+Library functions such as
+utf8.AppendRune or
+utf8.EncodeRune
+should be used instead.
+