Skip to content

Commit

Permalink
google#770 Issue. Updated: decisions.md, updated: best-practices.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapatil37 committed Jun 23, 2023
1 parent 2173b8d commit 02ebcea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions go/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion go/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 02ebcea

Please sign in to comment.