Skip to content

Commit

Permalink
Fix punctuation in integers.md (#818)
Browse files Browse the repository at this point in the history
For correctness:
1. Added a comma
2. Removed an extra incorrect comma in another sentence
  • Loading branch information
anujjoshi63 authored Nov 9, 2024
1 parent cf0f9d8 commit 4319f0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integers.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ func Add(x, y int) int {

If you really want to go the extra mile you can make [Testable Examples](https://blog.golang.org/examples). You will find many examples in the standard library documentation.

Often code examples that can be found outside the codebase, such as a readme file become out of date and incorrect compared to the actual code because they don't get checked.
Often code examples that can be found outside the codebase, such as a readme file, become out of date and incorrect compared to the actual code because they don't get checked.

Example functions are compiled whenever tests are executed. Because such examples are validated by the Go compiler, you can be confident your documentation's examples always reflect current code behavior.

Example functions begin with `Example` (much like test functions begin with `Test`), and reside in a package's `_test.go` files, . Add the following `ExampleAdd` function to the `adder_test.go` file.
Example functions begin with `Example` (much like test functions begin with `Test`), and reside in a package's `_test.go` files. Add the following `ExampleAdd` function to the `adder_test.go` file.

```go
func ExampleAdd() {
Expand Down

0 comments on commit 4319f0c

Please sign in to comment.