gvisorgvisor.dev/gvisor/tools/go_marshal/gomarshal Index | Files

package gomarshal

import "gvisor.dev/gvisor/tools/go_marshal/gomarshal"

Package gomarshal implements the go_marshal code generator. See README.md.

Index

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator drives code generation for a single invocation of the go_marshal utility.

The Generator holds arguments passed to the tool, and drives parsing, processing and code Generator for all types marked with +marshal declared in the input files.

See Generator.run() as the entry point.

func NewGenerator

func NewGenerator(srcs []string, out, outTest, outTestUnconditional, pkg string, imports []string) (*Generator, error)

NewGenerator creates a new code Generator.

func (*Generator) Run

func (g *Generator) Run() error

Run is the entry point to code generation using g.

Run parses all input source files specified in g and emits generated code.

Source Files

generator.go generator_interfaces.go generator_interfaces_array_newtype.go generator_interfaces_dynamic.go generator_interfaces_primitive_newtype.go generator_interfaces_struct.go generator_tests.go util.go

Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
13 packages
Last checked
4 hours ago

Tools for package owners.