#770 Issue. Updated: decisions.md, updated: best-practices.md

This commit is contained in:
Aditya Patil 2023-06-23 14:24:54 +05:30
parent 2173b8d68c
commit 02ebceac45
2 changed files with 3 additions and 3 deletions

View File

@ -1255,7 +1255,7 @@ information to the reader:
// string.
//
// format is the format, and data is the interpolation data.
func Sprintf(format string, data ...interface{}) string
func Sprintf(format string, data ...any) string
```
However, this snippet demonstrates a code scenario similar to the previous where
@ -1272,7 +1272,7 @@ reader:
// the format specification, the function will inline warnings about formatting
// errors into the output string as described by the Format errors section
// above.
func Sprintf(format string, data ...interface{}) string
func Sprintf(format string, data ...any) string
```
Consider your likely audience in choosing what to document and at what depth.

View File

@ -2978,7 +2978,7 @@ right:
// Bad:
package assert
func IsNotNil(t *testing.T, name string, val interface{}) {
func IsNotNil(t *testing.T, name string, val any) {
if val == nil {
t.Fatalf("data %s = nil, want not nil", name)
}