httpHelpers

package
v0.0.0-...-1125b20 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Navs []TopBarInfo

Functions

func AddContentToPage

func AddContentToPage(w http.ResponseWriter, contentTemplate string, data interface{})

AddContentToPage just opens a template, sends whatever data it's given to it, and adds that to a http response writer

func GetRelativePath

func GetRelativePath(root string, path string) (ret string)

GetRelativePath takes a path and gives you the path after the root. there's more algorithm to it than I thought, so i made a helper func

func WrapInBoilerPlate

func WrapInBoilerPlate(w http.ResponseWriter, data string)

this and the next function are bad and I need to re-do how the templating system works in the app.

Types

type TopBarInfo

type TopBarInfo struct {
	Name, Link string
}

Jump to

Keyboard shortcuts

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