Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoEmbeddedImage = errors.New("no embedded linux image")
ErrNoEmbeddedImage is thrown if the current binary has no embedded linux image.
Functions ¶
func DigestAndSize ¶
DigestAndSize returns the digest and size of the given Reader.
func EmbeddedLinuxImage ¶
func EmbeddedLinuxImage() (io.ReadCloser, error)
EmbeddedLinuxImage returns a reader pointing to an embedded linux image with the following assumptions: - if the current GOOS is linux, returns the current binary. - if the current GOOS is darwin, and current binary size is larger than what Mach-O reports, returns a reader to the current binary offset by the size of the darwin binary. - returns ErrNoEmbeddedImage if
- if the current GOOS is not darwin
- if the current GOOS is darwin, but there's no embedding.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.