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

htmlreport

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package htmlreport renders a project report into a standalone HTML document.

The report body is authored as markdown; this package converts it to HTML, wraps it in a self-contained document, and can optionally inline every locally served image as a base64 data URI so the result is fully portable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Title is the report title, used as the document <title>.
	Title string
	// Markdown is the report body.
	Markdown string
	// InlineImages embeds local assets as base64 data URIs when true;
	// when false the original image URLs are kept as-is.
	InlineImages bool
	// BaseDir is storage.base_dir, used to locate local assets when
	// InlineImages is true.
	BaseDir string
}

Options controls a single render.

type Renderer

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

Renderer converts report markdown into a standalone HTML document. It is safe for concurrent use.

func New

func New() *Renderer

New returns a Renderer backed by a GFM-flavoured markdown parser.

func (*Renderer) Render

func (r *Renderer) Render(opts Options) ([]byte, error)

Render converts markdown to a full HTML document according to opts.

Jump to

Keyboard shortcuts

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