Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/snabb/lazybytes

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/snabb/lazybytes

  • v0.0.0-20181119203557-78694192233d
  • Source
  • Go
  • Socket score

Version published
Created
Source

lazybytes

GoDoc

The Go package lazybytes implements a bytes.Reader which is initialized lazily on first access.

Documentation:

https://godoc.org/github.com/snabb/lazybytes

Simple example:

	f := func() []byte {
		fmt.Println("initializing")
		return []byte("hello world\n")
	}
	lr := lazybytes.NewReader(f)
	fmt.Println("not yet initialized")
	fmt.Println("len =", lr.Len())
	lr.WriteTo(os.Stdout)
	// Output:
	// not yet initialized
	// initializing
	// len = 12
	// hello world

The Git repository is located at: https://github.com/snabb/lazybytes

License

MIT

FAQs

Package last updated on 19 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc