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

sourcecheck

package
v1.152.5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package sourcecheck holds the checks a drawn source passes before it is stored: a Graphviz DOT source (#2303) and a Vega-Lite specification (#2296).

The portal draws each in the reader's browser, so the source decides what that browser does. A DOT source that does not parse would store an asset that draws nothing, and a Vega-Lite spec naming a URL would make every reader's browser fetch it. Both are refused here, before anything is written, by every door a source can be stored through: save_asset, manage_asset, the portal's REST writes and a script's platform.export.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(contentType, body string) error

Check refuses a source of a drawn content type that cannot be stored, and returns nil for a source that can and for every other content type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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