Skip to content

Commit 1795c3f

Browse files
authored
chore: update godoc for instrument to have better test example (#227)
1 parent 9ae9a6d commit 1795c3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

instrument/doc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ Then call the functions:
2121
2222
For testing, you can create your own mock instrument and use it:
2323
func TestSomething (t *testing.T) {
24+
log := testutil.TL(t)
2425
old := instrument.GetGlobalClient()
2526
t.Cleanup(func(){ instrument.SetGlobalClient(old) })
26-
instrument.SetGlobalClient(myMockClient)
27+
instrument.SetGlobalClient(instrument.MockClient{Logger: log})
2728
}
2829
*/
2930
package instrument

0 commit comments

Comments
 (0)