helper

package
v0.0.0-...-ca5afe3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package helper contains useful helper functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BarChart

func BarChart(v []ChartValue, id, label string) template.HTML

BarChart returns a save HTML fragment of the data as a bar chart. User must embed chart.js.

func EncodePassword

func EncodePassword(pw string) string

EncodePassword encodes the password as a secure hash. It is not consistent across restarts.

func Format

func Format(b []byte) template.HTML

Format returns a save html version of the Markdown input.

func PieChart

func PieChart(v []ChartValue, id, label string) template.HTML

PieChart returns a save HTML fragment of the data as a pie chart. User must embed chart.js.

Types

type ChartValue

type ChartValue struct {
	Label string
	Value float64
}

ChartValue represents a single data point in a chart.

Jump to

Keyboard shortcuts

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