Skip to content

A collections of helpers for gorilla/mux and Go's net/http.

License

Notifications You must be signed in to change notification settings

lucyyangrui/muxutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

muxutil

A collections of helpers for gorilla/mux and Go's net/http.

Renders

JSON

func jsonRenderHandler(w http.ResponseWriter, r *http.Request) {
	d := map[string]interface{} {
		"team": "tfcloud-go",
	}
	if err := render.JSON(w, http.StatusOK, d); err != nil {
		// do something
	}
}

Text

func textRenderHandler(w http.ResponseWriter, r *http.Request) {
	d := "tfcloud-go"
	if err := render.Text(w, http.StatusOK, d); err != nil {
		// do something
	}
}

License

Licensed under the Apache 2.0. The TFCloud Go Team.

About

A collections of helpers for gorilla/mux and Go's net/http.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages