Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.0.1-2020.1.5 / staticcheck / testdata / src / CheckPureFunctions / CheckPureFunctions_test.go
1 package pkg
2
3 import (
4         "strings"
5         "testing"
6 )
7
8 func TestFoo(t *testing.T) {
9         strings.Replace("", "", "", 1) // want `is a pure function but its return value is ignored`
10 }
11
12 func BenchmarkFoo(b *testing.B) {
13         strings.Replace("", "", "", 1)
14 }
15
16 func doBenchmark(s string, b *testing.B) {
17         strings.Replace("", "", "", 1)
18 }
19
20 func BenchmarkBar(b *testing.B) {
21         doBenchmark("", b)
22 }