package buildid

import "cmd/internal/buildid"

Index

Functions

func FindAndHash

func FindAndHash(r io.Reader, id string, bufSize int) (matches []int64, hash [32]byte, err error)

FindAndHash reads all of r and returns the offsets of occurrences of id. While reading, findAndHash also computes and returns a hash of the content of r, but with occurrences of id replaced by zeros. FindAndHash reads bufSize bytes from r at a time. If bufSize == 0, FindAndHash uses a reasonable default.

func ReadELFNote

func ReadELFNote(filename, name string, typ int32) ([]byte, error)

func ReadFile

func ReadFile(name string) (id string, err error)

ReadFile reads the build ID from an archive or executable file.

func Rewrite

func Rewrite(w io.WriterAt, pos []int64, id string) error

Source Files

buildid.go note.go rewrite.go

Version
v1.14.6
Published
Jul 16, 2020
Platform
js/wasm
Imports
11 packages
Last checked
11 seconds ago

Tools for package owners.