tdata

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromFile

func FromFile(filename string) string

FromFile gets a string data from a file

func ServerFileHandler

func ServerFileHandler(filename string) func(w http.ResponseWriter, r *http.Request)

ServerFileHandler serves static content from a file

func ServerHandler

func ServerHandler(content string) func(w http.ResponseWriter, r *http.Request)

ServerHandler serves string content

func ServerJSONFileHandler

func ServerJSONFileHandler(filename string) func(w http.ResponseWriter, r *http.Request)

ServerJSONFileHandler serves static JSON content from a file

func ServerJSONHandler

func ServerJSONHandler(content string) func(w http.ResponseWriter, r *http.Request)

ServerJSONHandler serves string content as JSON

func ToFile

func ToFile(filename string, content string)

ToFile is a helper function to create a file from a given content

Types

This section is empty.

Jump to

Keyboard shortcuts

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