diff --git a/README.md b/README.md index c29991e..d7914a9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A bunch of useful utilities for whenever I do web programming in Go. Like a fram ## Docs -https://godoc.org/github.com/jtolds/webhelp +https://godoc.org/gopkg.in/webhelp.v1 See also the OAuth2 extensions: https://github.com/jtolds/webhelp-oauth2 diff --git a/examples_test.go b/examples_test.go index 1f73e89..bae6e5e 100644 --- a/examples_test.go +++ b/examples_test.go @@ -7,9 +7,9 @@ import ( "fmt" "net/http" - "github.com/jtolds/webhelp/whcompat" - "github.com/jtolds/webhelp/whlog" - "github.com/jtolds/webhelp/whmux" + "gopkg.in/webhelp.v1/whcompat" + "gopkg.in/webhelp.v1/whlog" + "gopkg.in/webhelp.v1/whmux" ) var ( diff --git a/gensym_test.go b/gensym_test.go index 1ef1798..5e2c464 100644 --- a/gensym_test.go +++ b/gensym_test.go @@ -7,12 +7,13 @@ import ( "fmt" "net/http" - "github.com/jtolds/webhelp" - "github.com/jtolds/webhelp/whcompat" - "github.com/jtolds/webhelp/wherr" - "github.com/jtolds/webhelp/whlog" - "github.com/jtolds/webhelp/whroute" "golang.org/x/net/context" + "gopkg.in/webhelp.v1" + "gopkg.in/webhelp.v1/whcompat" + "gopkg.in/webhelp.v1/wherr" + "gopkg.in/webhelp.v1/whlog" + "gopkg.in/webhelp.v1/whmux" + "gopkg.in/webhelp.v1/whroute" ) var ( diff --git a/pkg.go b/pkg.go index cc8416c..85b4960 100644 --- a/pkg.go +++ b/pkg.go @@ -10,6 +10,6 @@ // subpackage. // // See an example (that includes OAuth2) at -// https://github.com/jtolds/webhelp-oauth2/blob/master/examples/one/main.go +// https://gopkg.in/webhelp.v1-oauth2/blob/master/examples/one/main.go // -package webhelp +package webhelp // import "gopkg.in/webhelp.v1" diff --git a/whcompat/close17.go b/whcompat/close17.go index 2a16bae..381fc9a 100644 --- a/whcompat/close17.go +++ b/whcompat/close17.go @@ -8,8 +8,8 @@ package whcompat import ( "net/http" - "github.com/jtolds/webhelp/whroute" "golang.org/x/net/context" + "gopkg.in/webhelp.v1/whroute" ) // CloseNotify causes a handler to have its request.Context() canceled the diff --git a/whcompat/compat16.go b/whcompat/compat16.go index 6108c86..bed872c 100644 --- a/whcompat/compat16.go +++ b/whcompat/compat16.go @@ -13,7 +13,7 @@ import ( "runtime" "sync" - "github.com/jtolds/webhelp/whroute" + "gopkg.in/webhelp.v1/whroute" "golang.org/x/net/context" ) diff --git a/whcompat/pkg.go b/whcompat/pkg.go index d20b69e..e9e1d6c 100644 --- a/whcompat/pkg.go +++ b/whcompat/pkg.go @@ -8,4 +8,4 @@ // which aren't available in earlier Go releases. This package backports all // of the functionality in a forwards-compatible way. You can use this package // to get the desired behavior for all Go releases. -package whcompat +package whcompat // import "gopkg.in/webhelp.v1/whcompat" diff --git a/wherr/errors.go b/wherr/errors.go index 38b0868..08f8124 100644 --- a/wherr/errors.go +++ b/wherr/errors.go @@ -2,18 +2,18 @@ // See LICENSE for copying information // Package wherr provides a unified error handling framework for http.Handlers. -package wherr +package wherr // import "gopkg.in/webhelp.v1/wherr" import ( "log" "net/http" - "github.com/jtolds/webhelp" - "github.com/jtolds/webhelp/whcompat" - "github.com/jtolds/webhelp/whroute" "github.com/spacemonkeygo/errors" "github.com/spacemonkeygo/errors/errhttp" "golang.org/x/net/context" + "gopkg.in/webhelp.v1" + "gopkg.in/webhelp.v1/whcompat" + "gopkg.in/webhelp.v1/whroute" ) var ( diff --git a/wherr/example_test.go b/wherr/example_test.go index c6f0c26..7c37060 100644 --- a/wherr/example_test.go +++ b/wherr/example_test.go @@ -7,9 +7,9 @@ import ( "fmt" "net/http" - "github.com/jtolds/webhelp/wherr" - "github.com/jtolds/webhelp/whlog" - "github.com/jtolds/webhelp/whmux" + "gopkg.in/webhelp.v1/wherr" + "gopkg.in/webhelp.v1/whlog" + "gopkg.in/webhelp.v1/whmux" "github.com/spacemonkeygo/errors/errhttp" ) diff --git a/whfatal/fatal.go b/whfatal/fatal.go index a6f38ed..0b00b92 100644 --- a/whfatal/fatal.go +++ b/whfatal/fatal.go @@ -3,15 +3,15 @@ // Package whfatal uses panics to make early termination of http.Handlers // easier. No other webhelp package depends on or uses this one. -package whfatal +package whfatal // import "gopkg.in/webhelp.v1/whfatal" import ( "net/http" - "github.com/jtolds/webhelp/wherr" - "github.com/jtolds/webhelp/whmon" - "github.com/jtolds/webhelp/whredir" - "github.com/jtolds/webhelp/whroute" + "gopkg.in/webhelp.v1/wherr" + "gopkg.in/webhelp.v1/whmon" + "gopkg.in/webhelp.v1/whredir" + "gopkg.in/webhelp.v1/whroute" ) type fatalBehavior func(w http.ResponseWriter, r *http.Request) diff --git a/whgls/gls.go b/whgls/gls.go index 98bb960..29137b9 100644 --- a/whgls/gls.go +++ b/whgls/gls.go @@ -7,17 +7,17 @@ // // The predominant use case for github.com/jtolds/gls is to attach a current // request's contextual information to all log lines kicked off by the request. -package whgls +package whgls // import "gopkg.in/webhelp.v1/whgls" import ( "log" "net/http" "github.com/jtolds/gls" - "github.com/jtolds/webhelp/whcompat" - "github.com/jtolds/webhelp/whmon" - "github.com/jtolds/webhelp/whroute" "golang.org/x/net/context" + "gopkg.in/webhelp.v1/whcompat" + "gopkg.in/webhelp.v1/whmon" + "gopkg.in/webhelp.v1/whroute" ) var ( @@ -65,7 +65,7 @@ func Load() *http.Request { // import ( // "net/http" // -// "github.com/jtolds/webhelp/whgls" +// "gopkg.in/webhelp.v1/whgls" // "google.golang.org/appengine/log" // ) // diff --git a/whjson/json.go b/whjson/json.go index 11fb0cb..536d4dd 100644 --- a/whjson/json.go +++ b/whjson/json.go @@ -3,7 +3,7 @@ // Package whjson provides some nice utilities for dealing with JSON-based // APIs, such as a good JSON wherr.Handler. -package whjson +package whjson // import "gopkg.in/webhelp.v1/whjson" import ( "encoding/json" @@ -11,9 +11,9 @@ import ( "log" "net/http" - "github.com/jtolds/webhelp/whcompat" - "github.com/jtolds/webhelp/wherr" "github.com/spacemonkeygo/errors/errhttp" + "gopkg.in/webhelp.v1/whcompat" + "gopkg.in/webhelp.v1/wherr" ) var ( diff --git a/whlog/logging.go b/whlog/logging.go index 218b12d..b790fad 100644 --- a/whlog/logging.go +++ b/whlog/logging.go @@ -2,15 +2,15 @@ // See LICENSE for copying information // Package whlog provides functionality to log incoming requests and results. -package whlog +package whlog // import "gopkg.in/webhelp.v1/whlog" import ( "log" "net/http" "time" - "github.com/jtolds/webhelp/whmon" - "github.com/jtolds/webhelp/whroute" + "gopkg.in/webhelp.v1/whmon" + "gopkg.in/webhelp.v1/whroute" ) type Loggerf func(format string, arg ...interface{}) diff --git a/whlog/serve.go b/whlog/serve.go index 9015292..c10c2c3 100644 --- a/whlog/serve.go +++ b/whlog/serve.go @@ -9,7 +9,7 @@ import ( "net/http" "time" - "github.com/jtolds/webhelp/whcompat" + "gopkg.in/webhelp.v1/whcompat" ) const ( diff --git a/whmon/rid.go b/whmon/rid.go index 1a5f8a4..e7a5cb8 100644 --- a/whmon/rid.go +++ b/whmon/rid.go @@ -9,9 +9,9 @@ import ( "sync/atomic" "time" - "github.com/jtolds/webhelp" - "github.com/jtolds/webhelp/whcompat" - "github.com/jtolds/webhelp/whroute" + "gopkg.in/webhelp.v1" + "gopkg.in/webhelp.v1/whcompat" + "gopkg.in/webhelp.v1/whroute" "golang.org/x/net/context" ) diff --git a/whmon/writer.go b/whmon/writer.go index c119cd5..6e114d4 100644 --- a/whmon/writer.go +++ b/whmon/writer.go @@ -3,12 +3,12 @@ // Package whmon provides a means to monitor various aspects of how the request // and response is going. -package whmon +package whmon // import "gopkg.in/webhelp.v1/whmon" import ( "net/http" - "github.com/jtolds/webhelp/whroute" + "gopkg.in/webhelp.v1/whroute" ) type rWriter struct { diff --git a/whmux/argmux.go b/whmux/argmux.go index 4a2e7bc..60ee61d 100644 --- a/whmux/argmux.go +++ b/whmux/argmux.go @@ -9,10 +9,10 @@ import ( "golang.org/x/net/context" - "github.com/jtolds/webhelp" - "github.com/jtolds/webhelp/whcompat" - "github.com/jtolds/webhelp/wherr" - "github.com/jtolds/webhelp/whroute" + "gopkg.in/webhelp.v1" + "gopkg.in/webhelp.v1/whcompat" + "gopkg.in/webhelp.v1/wherr" + "gopkg.in/webhelp.v1/whroute" ) // StringArg is a way to pull off arbitrary path elements from an incoming diff --git a/whmux/mux.go b/whmux/mux.go index 9135e13..fa2d746 100644 --- a/whmux/mux.go +++ b/whmux/mux.go @@ -3,15 +3,15 @@ // Package whmux provides some useful request mux helpers for demultiplexing // requests to one of a number of handlers. -package whmux +package whmux // import "gopkg.in/webhelp.v1/whmux" import ( "net/http" "sort" "strings" - "github.com/jtolds/webhelp/wherr" - "github.com/jtolds/webhelp/whroute" + "gopkg.in/webhelp.v1/wherr" + "gopkg.in/webhelp.v1/whroute" ) // Dir is an http.Handler that mimics a directory. It mutates an incoming diff --git a/whparse/query.go b/whparse/query.go index c0ae0d1..b6566da 100644 --- a/whparse/query.go +++ b/whparse/query.go @@ -2,7 +2,7 @@ // See LICENSE for copying information // Package whparse provides some convenient input parsing helpers. -package whparse +package whparse // import "gopkg.in/webhelp.v1/whparse" import ( "strconv" diff --git a/whredir/redirect.go b/whredir/redirect.go index ed8f8e7..c4294f8 100644 --- a/whredir/redirect.go +++ b/whredir/redirect.go @@ -3,13 +3,13 @@ // Package whredir provides some helper methods and handlers for redirecting // incoming requests to other URLs. -package whredir +package whredir // import "gopkg.in/webhelp.v1/whredir" import ( "net/http" - "github.com/jtolds/webhelp/whmux" - "github.com/jtolds/webhelp/whroute" + "gopkg.in/webhelp.v1/whmux" + "gopkg.in/webhelp.v1/whroute" ) // Redirect is just http.Redirect with http.StatusSeeOther which I always diff --git a/whroute/routes.go b/whroute/routes.go index 249791b..38fd251 100644 --- a/whroute/routes.go +++ b/whroute/routes.go @@ -3,7 +3,7 @@ // Package whroute provides utilities to implement route listing, whereby // http.Handlers that opt in can list what routes they understand. -package whroute +package whroute // import "gopkg.in/webhelp.v1/whroute" import ( "fmt" diff --git a/whsess/store.go b/whsess/store.go index 640a28d..6fad721 100644 --- a/whsess/store.go +++ b/whsess/store.go @@ -5,15 +5,15 @@ // package. Attempting to be a combination of minimal and useful. Implementing // the Store interface is all one must do to provide a different session // storage mechanism. -package whsess +package whsess // import "gopkg.in/webhelp.v1/whsess" import ( "net/http" - "github.com/jtolds/webhelp/whcompat" - "github.com/jtolds/webhelp/whroute" "github.com/spacemonkeygo/errors" "golang.org/x/net/context" + "gopkg.in/webhelp.v1/whcompat" + "gopkg.in/webhelp.v1/whroute" ) type ctxKey int diff --git a/whtmpl/tmpl.go b/whtmpl/tmpl.go index 7bc27eb..3147889 100644 --- a/whtmpl/tmpl.go +++ b/whtmpl/tmpl.go @@ -3,7 +3,7 @@ // Package whtmpl provides some helpful utilities for constructing and using // lots of html/templates -package whtmpl +package whtmpl // import "gopkg.in/webhelp.v1/whtmpl" import ( "fmt" @@ -13,7 +13,7 @@ import ( "runtime" "strings" - "github.com/jtolds/webhelp/wherr" + "gopkg.in/webhelp.v1/wherr" ) // Pair is a useful type that allows for passing more than one current template @@ -42,7 +42,7 @@ type Pair struct { // // package views // -// import "github.com/jtolds/webhelp/whtmpl" +// import "gopkg.in/webhelp.v1/whtmpl" // // var Templates = whtmpl.NewCollection() //