placeholders

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Replace

func Replace(placeholders map[string]string, dash dashboard.DashboardSpec) (*dashboard.DashboardSpec, error)

Replace replaces the placeholders in a dashboard, with the provided values from the placeholders map. The placeholders must use the following format in the dashboard to be replaced: "{% .placeholder %}". To replace the placeholders we have to convert the dashboard to it's json string representation, which is then passed to the template together with the placeholders. The result is then unmarshaled back to the dashboard struct and returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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