Skip to content

Commit

Permalink
Update slice_example_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Apr 17, 2024
1 parent b913720 commit aa8faa8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions slice_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,3 +456,13 @@ func ExampleIsSortedByKey() {

// Output: true
}

func ExampleAvg() {
numbers := []int{1, 2, 3, 4, 5}

result := Avg(numbers)

fmt.Printf("%v", result)

// Output: 3
}

0 comments on commit aa8faa8

Please sign in to comment.