Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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