view

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package view renders the self-contained HTML document used when the report is opened over file://.

A browser blocks fetch() against file:// URLs, so the served page's fetch of ?data= cannot work there. The standalone document therefore inlines the same stylesheet and script the server serves, plus the report itself as window.__COVER100_DATA__, which the page prefers over any fetch. Both forms are generated from the same source files, so they cannot drift.

Index

Constants

View Source
const (
	IndexFile  = "index.html"
	StyleFile  = "styles.css"
	ScriptFile = "app.js"
)

Source file names inside the public asset filesystem.

Variables

This section is empty.

Functions

func Standalone

func Standalone(assets fs.FS, report []byte) ([]byte, error)

Standalone renders index.html with the stylesheet, script and report inlined.

Types

This section is empty.

Jump to

Keyboard shortcuts

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