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

svg

package
v3.1.61 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Init discovers SVG icons and populates the `svgIcons` variable

func MockIcon

func MockIcon(icon string) func()

func Normalize

func Normalize(data []byte, size int) []byte

Normalize normalizes the SVG content: set default width/height, remove unnecessary tags/attributes It's designed to work with valid SVG content. For invalid SVG content, the returned content is not guaranteed.

func RenderHTML

func RenderHTML(icon string, others ...any) template.HTML

RenderHTML renders icons - arguments icon name (string), size (int), class (string)

Types

This section is empty.

Source Files

  • processor.go
  • svg.go

Jump to

Keyboard shortcuts

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