Dustin H

Results 48 comments of Dustin H

Ah, I meant to say you could do: ``` go Rand(buf) for cond { Rand(buf) } ``` Feels a little more obvious about what the loop is doing. Why not...

Hey @eric sorry for the slow response, things are super busy for me lately! So basically you'd like to be able to drop slow readers when they impede the flow....

Hey just wanted to say I started looking into this over the weekend, and ran into a couple complications. Mainly just that currently NextReader() returns a reader which is *not*...

I like the idea of supporting Peek, though unfortunately it would be a 'breaking' change to add it to the interface so I'd have to do a major version number...

@mstaack Can you clarifying what you mean by synced aligned reads? The suggestion I made before could also be done using a [bufio.Scanner](https://golang.org/pkg/bufio/#NewScanner): ```go s := bufio.NewScanner(buf.NextReaderFromNow()) s.Split(func(data []byte, atEOF...

I think one shouldn't usually expect the io.Reader interface to work like that, I think using a Scanner + Split function that handles alignment and then processing the Scanned tokens...

You can chain http.Handlers together, so you can wrap the cached Handler and set the headers in the outer wrapper. ``` ch := fscache.Handler(cache, myExpensiveHandler) withHeaders := http.HandlerFunc(...) { .......

That's only the start of the ugliness I do in there. It basically says: if the key can be base64 encoded and fit in a std. filename then do that...

Submitting a sample version (very rough), but boltdb is incredibly slow on my windows box (https://github.com/boltdb/bolt/issues/516) sooo don't know if it's worth including.

Badger seems like a neat idea to use instead of bolt for managing the key db (certainly open to pull requests to add new "FileSystems" etc. though I might consider...