proxy.golang.org : github.com/snabb/lazybytes
Package lazybytes implements a bytes.Reader which is initialized lazily. Otherwise it performs exactly like bytes.Reader. The constructor takes a function which is called to perform initialization when the Reader is accessed first time. This may be useful with http.ServeContent. By wrapping your content template rendering in lazybytes.Reader the rendering will be skipped if the content is not needed (for example if the client makes an If-Modified-Since request).
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/snabb/lazybytes
License: MIT
Latest release: over 6 years ago
First release: over 6 years ago
Namespace: github.com/snabb
Stars: 1 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 1 month ago