mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-13 08:03:17 +02:00
Docs and Matrix tests
This commit is contained in:
parent
0ff8e968ca
commit
18bd3c0e55
12 changed files with 172 additions and 140 deletions
util
|
@ -18,7 +18,8 @@ type PeekedReadCloser struct {
|
|||
closed bool
|
||||
}
|
||||
|
||||
// Peek reads the underlying ReadCloser into memory up until the limit and returns a PeekedReadCloser
|
||||
// Peek reads the underlying ReadCloser into memory up until the limit and returns a PeekedReadCloser.
|
||||
// It does not return an error if limit is reached. Instead, LimitReached will be set to true.
|
||||
func Peek(underlying io.ReadCloser, limit int) (*PeekedReadCloser, error) {
|
||||
if underlying == nil {
|
||||
underlying = io.NopCloser(strings.NewReader(""))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue