-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Reset function to MemoryWriter (#99)
Since the MemoryWriter was updated to address race conditions, access to the slice is now private, so it cannot be replaced with an empty slice when you want to reset it. This is done in the spectator-go-runtime-metrics library, and may be done in other places. This change adds a Reset function to the MemoryWriter, which can be used to reset the storage to an empty slice.
- Loading branch information
1 parent
a361950
commit 9a2b37c
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters