figure

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package figure draws the figure the README opens with: the proxyfile a person writes beside the whole configuration proxyfile generates from it. Both panes are drawn from the two files' own text, so a test keeps the committed figure equal to what the program writes today.

The figure is plain SVG 1.1 that carries its text, colours and fonts as presentation attributes. A README shows it as an image, which runs no script and loads no other file, and the reader's browser draws its text with the fonts the reader's system has, so the figure names a list of common ones and never a font file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Comparison

func Comparison(source, generated []byte, sourceName, generatedName string, theme Theme) []byte

Comparison returns an SVG document that shows every line of source, the file a person writes, in a readable pane beside every line of generated, the file proxyfile generates from it, in a wider pane whose text is too small to read: the figure shows how much is generated, not what. The names are the files' names shown in the titles.

Types

type Theme

type Theme int

Theme is the colour scheme a figure is drawn in. The README shows the one that matches the reader's GitHub theme.

const (
	Light Theme = iota
	Dark
)

Jump to

Keyboard shortcuts

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