utils

package
v0.0.0-...-a9ba42c Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanBeEdited

func CanBeEdited(filename string) bool

CanBeEdited checks if the extension of a file is supported by the editor

func CopyFile

func CopyFile(old, new string) error

CopyFile is used to copy a file

func Defined

func Defined(data interface{}, field string) bool

Defined checks if variable is defined in a struct

func Dict

func Dict(values ...interface{}) (map[string]interface{}, error)

Dict allows to send more than one variable into a template

func GetTemplate

func GetTemplate(r *http.Request, functions template.FuncMap, templates ...string) (*template.Template, error)

GetTemplate is used to get a ready to use template based on the url and on other sent templates

func IsMap

func IsMap(sth interface{}) bool

IsMap checks if some variable is a map

func IsSlice

func IsSlice(sth interface{}) bool

IsSlice checks if some variable is a slice

func ParseComponents

func ParseComponents(r *http.Request) []string

ParseComponents parses the components of an URL creating an array

func Run

func Run(c *config.Config)

Run is used to run the static website generator

func SplitCapitalize

func SplitCapitalize(name string) string

SplitCapitalize splits a string by its uppercase letters and capitalize the first letter of the string

Types

This section is empty.

Jump to

Keyboard shortcuts

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