helpers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(slice []string, str string) bool

helper function to check if a string exists in a slice

func ExecuteTemplate

func ExecuteTemplate(tmpl TemplateFile) (string, error)

func WriteConfigFile

func WriteConfigFile(filename string, data interface{}) error

Types

type TemplateFile

type TemplateFile struct {
	Tags []string `yaml: "tags"`

	Template struct {
		Vars map[string]string `yaml: "vars"`

		Text string `yaml: "text"`
	} `yaml: "template"`
}

func LoadTemplateFile

func LoadTemplateFile(filename string) (TemplateFile, error)

Jump to

Keyboard shortcuts

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