Help us shape the future of Go! Take the 2026 Go Developer Survey

render

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package render turns the raw purego emitter's resolved view (package view) into Go source through templates only. It makes no resolution decisions and imports no metadata or type-mapping packages — every value it needs is already present on the view. The output is pre-gofmt; the caller canonicalises it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClassMethod

func ClassMethod(method view.RawMethod) ([]byte, error)

ClassMethod renders one Go method (or class function) wrapping an ObjC method via objc.Send, as a Go source fragment.

func ClassTypeDecl

func ClassTypeDecl(decl view.ClassTypeDecl) ([]byte, error)

ClassTypeDecl renders one ObjC class's Go struct declaration (and, for root classes, its promoted Ptr/InitPtr accessors) as a Go source fragment.

func ClassVars

func ClassVars(vars view.ClassVars) ([]byte, error)

ClassVars renders a class's package-level class-reference and selector variable block as a Go source fragment.

func Enums

func Enums(enums []view.Enum) ([]byte, error)

Enums renders all enum declarations for a package as a Go source fragment.

func Externs

func Externs(externs []view.Extern) ([]byte, error)

Externs renders all extern-symbol accessor functions for a package as a Go source fragment.

func FromIDConstructor

func FromIDConstructor(ctor view.FromIDConstructor) ([]byte, error)

FromIDConstructor renders a class's XFromID factory function as a Go source fragment.

func Functions

func Functions(functions view.FunctionFile) ([]byte, error)

Functions renders the function-pointer var block and the exported wrapper functions for a package as a Go source fragment.

func Protocols

func Protocols(protocols []view.Protocol) ([]byte, error)

Protocols renders all protocol interface declarations for a package as a Go source fragment.

func Structs

func Structs(structs []view.Struct) ([]byte, error)

Structs renders all struct type declarations for a package as a Go source fragment.

func TypedefAliases

func TypedefAliases(aliases []view.TypedefAlias) ([]byte, error)

TypedefAliases renders all C-typedef Go type aliases for a package as a Go source fragment.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL