Skip to content

Commit 66d41e5

Browse files
committed
chore: clarify readme
Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent e6c54e9 commit 66d41e5

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Various utilities for Go and TypeScript including:
1313

1414
- [backoff]: configurable backoff
1515
- [broadcast]: channel-based broadcast (similar to sync.Cond)
16+
- [bufio]: SplitOnNul is a bufio.SplitFunc that splits on NUL characters
1617
- [ccall]: call a set of functions concurrently and wait for error or exit
1718
- [ccontainer]: concurrent container for objects
1819
- [commonprefix]: find common prefix between strings
@@ -22,56 +23,73 @@ Various utilities for Go and TypeScript including:
2223
- [debounce-fswatcher]: debounce fs watcher events
2324
- [enabled]: three-way boolean proto enum
2425
- [exec]: wrapper around Go os exec
26+
- [filter]: filter strings by regex, prefix, suffix, etc.
2527
- [fsutil]: utilities for os filesystem
28+
- [gitcmd]: running git from Go
2629
- [gitroot]: git repository root finder
2730
- [httplog/fetch]: JS Fetch API wrapper with logging for WASM
2831
- [httplog]: HTTP request and response logging utilities
2932
- [iocloser]: wrap reader/writer with a close function
30-
- [iowriter]: io.Writer implementation with callback function
33+
- [ioproxy]: read/write between two different Go streams
34+
- [ioseek]: ReaderAtSeeker wraps an io.ReaderAt to provide io.Seeker behavior
3135
- [iosizer]: read/writer with metrics for size
36+
- [iowriter]: io.Writer implementation with callback function
3237
- [js/fetch]: Fetch API wrapper for WASM
3338
- [js/readable-stream]: ReadableStream wrapper for WASM
39+
- [js]: syscall/js utils for go
3440
- [keyed]: key/value based routine management
3541
- [linkedlist]: linked list with head/tail
3642
- [memo]: memoize a function: call it once and remember results
3743
- [padding]: pad / unpad a byte array slice
3844
- [prng]: psuedorandom generator with seed
3945
- [promise]: promise mechanics for Go (like JS)
4046
- [refcount]: reference counter ccontainer
47+
- [result]: contains the result tuple from an operation
48+
- [retry]: retry an operation in Go
4149
- [routine]: start, stop, restart, reset a goroutine
4250
- [scrub]: zero a buffer after usage
4351
- [unique]: deduplicated list of items by key
52+
- [vmime]: validate mime type
4453

4554
[backoff]: ./backoff
4655
[broadcast]: ./broadcast
56+
[bufio]: ./bufio
4757
[ccall]: ./ccall
4858
[ccontainer]: ./ccontainer
4959
[commonprefix]: ./commonprefix
5060
[conc]: ./conc
5161
[cqueue]: ./cqueue
5262
[csync]: ./csync
5363
[debounce-fswatcher]: ./debounce-fswatcher
64+
[enabled]: ./enabled
5465
[exec]: ./exec
66+
[filter]: ./filter
5567
[fsutil]: ./fsutil
68+
[gitcmd]: ./gitcmd
69+
[gitroot]: ./gitroot
5670
[httplog/fetch]: ./httplog/fetch
5771
[httplog]: ./httplog
5872
[iocloser]: ./iocloser
59-
[iowriter]: ./iowriter
73+
[ioproxy]: ./ioproxy
74+
[ioseek]: ./ioseek
6075
[iosizer]: ./iosizer
76+
[iowriter]: ./iowriter
6177
[js/fetch]: ./js/fetch
6278
[js/readable-stream]: ./js/readable-stream
79+
[js]: ./js
6380
[keyed]: ./keyed
6481
[linkedlist]: ./linkedlist
6582
[memo]: ./memo
6683
[padding]: ./padding
6784
[prng]: ./prng
6885
[promise]: ./promise
6986
[refcount]: ./refcount
87+
[result]: ./result
88+
[retry]: ./retry
7089
[routine]: ./routine
7190
[scrub]: ./scrub
7291
[unique]: ./unique
7392
[vmime]: ./vmime
74-
[vmime]: ./vmime
7593

7694
## License
7795

bufio/bufio.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package util_bufio
22

33
// SplitOnNul is a bufio.SplitFunc that splits on NUL characters.
44
func SplitOnNul(data []byte, atEOF bool) (advance int, token []byte, err error) {
5-
for i := 0; i < len(data); i++ {
5+
for i := range data {
66
if data[i] == '\x00' {
77
return i + 1, data[:i], nil
88
}

0 commit comments

Comments
 (0)