Skip to content

Commit

Permalink
Rename root package from httputils to web
Browse files Browse the repository at this point in the history
  • Loading branch information
janos committed Jul 30, 2017
1 parent 16e7ca5 commit cd8fbf6
Show file tree
Hide file tree
Showing 30 changed files with 34 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go:
- 1.8.1

install:
- go get -v resenje.org/httputils/...
- go get -v resenje.org/web/...

before_script:
- go vet -v resenje.org/httputils/...
- go vet -v resenje.org/web/...

script:
- go test -v resenje.org/httputils/...
- go test -v resenje.org/web/...
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# A collection of HTTP utilities for Go

[![GoDoc](https://godoc.org/resenje.org/httputils?status.svg)](https://godoc.org/resenje.org/httputils)
[![Build Status](https://travis-ci.org/janos/httputils.svg?branch=master)](https://travis-ci.org/janos/httputils)
[![GoDoc](https://godoc.org/resenje.org/web?status.svg)](https://godoc.org/resenje.org/web)
[![Build Status](https://travis-ci.org/janos/web.svg?branch=master)](https://travis-ci.org/janos/web)

## Installation

Run `go get resenje.org/httputils` from command line.
Run `go get resenje.org/web` from command line.
2 changes: 1 addition & 1 deletion auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils // import "resenje.org/httputils"
package web

import "net/http"

Expand Down
2 changes: 1 addition & 1 deletion chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"io/ioutil"
Expand Down
2 changes: 1 addition & 1 deletion client/api/api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package apiClient // import "resenje.org/httputils/client/api"
package apiClient

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion client/http/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httpClient // import "resenje.org/httputils/client/http"
package httpClient

import (
"crypto/tls"
Expand Down
2 changes: 1 addition & 1 deletion client/http/http_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func TestClientRetryFailure(t *testing.T) {
}

func TestClientRedirectHeaders(t *testing.T) {
want := "test httputils"
want := "test web"
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/redirect" {
http.Redirect(w, r, "/", http.StatusFound)
Expand Down
2 changes: 1 addition & 1 deletion file-server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package fileServer // import "resenje.org/httputils/file-server"
package fileServer

import (
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion form.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

// FormErrors represent structure errors returned by API server to
// request based on HTML form data.
Expand Down
2 changes: 1 addition & 1 deletion form_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import "testing"

Expand Down
2 changes: 1 addition & 1 deletion https_redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"crypto/tls"
Expand Down
2 changes: 1 addition & 1 deletion https_redirect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"crypto/tls"
Expand Down
2 changes: 1 addition & 1 deletion log/access/access_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package accessLog // import "resenje.org/httputils/log/access"
package accessLog

import (
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion max_body_bytes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion max_body_bytes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion method.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion method_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"net"
Expand Down
2 changes: 1 addition & 1 deletion request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"net/http/httptest"
Expand Down
2 changes: 1 addition & 1 deletion servers/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// Server wraps grpc.Server to provide methods for
// resenje.org/httputils/servers.Server interface.
// resenje.org/web/servers.Server interface.
type Server struct {
*grpc.Server
}
Expand Down
2 changes: 1 addition & 1 deletion servers/grpc/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"golang.org/x/net/context"
"google.golang.org/grpc"
"resenje.org/httputils/servers/grpc/internal/hello"
"resenje.org/web/servers/grpc/internal/hello"
)

type server struct{}
Expand Down
2 changes: 1 addition & 1 deletion servers/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Option func(*Options)
func WithTLSConfig(tlsConfig *tls.Config) Option { return func(o *Options) { o.tlsConfig = tlsConfig } }

// Server wraps http.Server to provide methods for
// resenje.org/httputils/servers.Server interface.
// resenje.org/web/servers.Server interface.
type Server struct {
http.Server
}
Expand Down
3 changes: 1 addition & 2 deletions servers/servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ func (l stdLogger) Errorf(format string, a ...interface{}) {
log.Printf("ERROR "+format, a...)
}

// Option is a function that sets optional parameters for
// the Serve function.
// Option is a function that sets optional parameters for Servers.
type Option func(*Servers)

// WithLogger sets the Logger instance for logging messages.
Expand Down
2 changes: 1 addition & 1 deletion set_headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import "net/http"

Expand Down
2 changes: 1 addition & 1 deletion set_headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion static_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion static_files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"io/ioutil"
Expand Down
2 changes: 1 addition & 1 deletion tcp_listeners.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package httputils
package web

import (
"net"
Expand Down

0 comments on commit cd8fbf6

Please sign in to comment.