Files
wehub-resource-sync c4536f7e05
CI / test (push) Failing after 1s
CI / macOS amd64 (push) Has been cancelled
CI / macOS arm64 (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:30:31 +08:00

25 lines
710 B
Go

package disasm
// File represents an object file, a module or anything that contains functions.
type File interface {
// Close closes the underlying data.
Close() error
// Funcs enumerates all the visualizable code blocks.
Funcs() []Func
}
// Func represents a function or method that can be independently rendered.
type Func interface {
// Name is the name of the func.
Name() string
// Load loads the source code and disassembles it.
Load(opt Options) (*Code, error)
}
// Options defines configuration for loading the func.
type Options struct {
// Context is the number of lines that should be additionally included for context.
// This can often contain function documentation.
Context int
}