README

webhelp

A bunch of useful utilities for whenever I do web programming in Go. Like a framework, but better, cause it's not.

Docs

https://godoc.org/gopkg.in/webhelp.v1

Recently, I wrote a long blog post about how to use webhelp: http://www.jtolds.com/writing/2017/01/writing-advanced-web-applications-with-go/

See also the OAuth2 extensions (https://github.com/go-webhelp/whoauth2) or the Goth extensions (https://github.com/go-webhelp/whgoth).

Documentation

Overview

    package webhelp is a bunch of useful utilities for doing web programming in Go. webhelp encourages you to use the standard library for web programming, but provides some oft-needed tools to help simplify the task.

    webhelp tightly integrates with the new Go 1.7 Request Context support, but has backported the functionality to previous Go releases in the whcompat subpackage.

    Recently I wrote a long blog post about how to use webhelp: http://www.jtolds.com/writing/2017/01/writing-advanced-web-applications-with-go/

    Example
    Output:
    
    

    Index

    Examples

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type ContextKey

    type ContextKey struct {
    	// contains filtered or unexported fields
    }

      ContextKey is only useful via the GenSym() constructor. See GenSym() for more documentation

      func GenSym

      func GenSym() ContextKey

        GenSym generates a brand new, never-before-seen ContextKey for use as a Context.WithValue key. Please see the example.

        Example
        Output:
        
        

        Source Files

        Directories

        Path Synopsis
        Package whauth provides some helper methods and handlers for dealing with HTTP basic auth
        Package whauth provides some helper methods and handlers for dealing with HTTP basic auth
        Package whcache provides a mechanism for per-request computation caching Sometimes you have a helper method that performs a computation or interacts with a datastore or remote resource, and that helper method gets called repeatedly.
        Package whcache provides a mechanism for per-request computation caching Sometimes you have a helper method that performs a computation or interacts with a datastore or remote resource, and that helper method gets called repeatedly.
        Package whcompat provides webhelp compatibility across different Go releases.
        Package whcompat provides webhelp compatibility across different Go releases.
        Package wherr provides a unified error handling framework for http.Handlers.
        Package wherr provides a unified error handling framework for http.Handlers.
        Package whfatal uses panics to make early termination of http.Handlers easier.
        Package whfatal uses panics to make early termination of http.Handlers easier.
        Package whgls provides webhelp tools that use grossness enabled by the github.com/jtolds/gls package.
        Package whgls provides webhelp tools that use grossness enabled by the github.com/jtolds/gls package.
        Package whjson provides some nice utilities for dealing with JSON-based APIs, such as a good JSON wherr.Handler.
        Package whjson provides some nice utilities for dealing with JSON-based APIs, such as a good JSON wherr.Handler.
        Package whlog provides functionality to log incoming requests and results.
        Package whlog provides functionality to log incoming requests and results.
        Package whmon provides a means to monitor various aspects of how the request and response is going.
        Package whmon provides a means to monitor various aspects of how the request and response is going.
        Package whmux provides some useful request mux helpers for demultiplexing requests to one of a number of handlers.
        Package whmux provides some useful request mux helpers for demultiplexing requests to one of a number of handlers.
        Package whparse provides some convenient input parsing helpers.
        Package whparse provides some convenient input parsing helpers.
        Package whredir provides some helper methods and handlers for redirecting incoming requests to other URLs.
        Package whredir provides some helper methods and handlers for redirecting incoming requests to other URLs.
        Package whroute provides utilities to implement route listing, whereby http.Handlers that opt in can list what routes they understand.
        Package whroute provides utilities to implement route listing, whereby http.Handlers that opt in can list what routes they understand.
        package whsess is a lightweight session storage mechanism for the webhelp package.
        package whsess is a lightweight session storage mechanism for the webhelp package.
        Package whtmpl provides some helpful utilities for constructing and using lots of html/templates
        Package whtmpl provides some helpful utilities for constructing and using lots of html/templates