render

package
v0.4.5-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package render implements a tool for rendering various "visualizations" of Go programs. -cgout Given a path for a .dot file, generates the callgraph of the program in that file. -ssaout Given a path for a folder, generates subfolders with files containing the ssa representation of each package in that file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GraphvizToFile

func GraphvizToFile(config *config.Config, cg *callgraph.Graph, filename string) error

GraphvizToFile writes the callgraph in Graphviz format to the filename provided as last argument

func OutputSsaPackages

func OutputSsaPackages(p *ssa.Program, dirName string) error

OutputSsaPackages writes the ssa representation of a program p. Each package is written in its own folder. This function may panic.

func Run

func Run(flags Flags) error

Run runs the render tool with flags.

func WriteCrossFunctionGraph

func WriteCrossFunctionGraph(wps *loadprogram.State, w io.Writer) error

WriteCrossFunctionGraph writes a graphviz representation of the inter-procedural dataflow graph to w.

func WriteGraphviz

func WriteGraphviz(config *config.Config, cg *callgraph.Graph, w io.Writer) error

WriteGraphviz writes a graphviz representation the call-graph to w

func WriteHTMLCallgrph

func WriteHTMLCallgrph(program *ssa.Program, cg *callgraph.Graph, outPath string) error

WriteHTMLCallgrph writes the callgraph in html format to the outpath provided

Types

type Flags

type Flags struct {
	tools.CommonFlags
	// contains filtered or unexported fields
}

Flags represents the parsed render sub-command flags.

func NewFlags

func NewFlags(args []string) (Flags, error)

NewFlags returns the parsed render sub-command flags from args.

Jump to

Keyboard shortcuts

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