Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 151bf8d

Browse files
committed
Updated for golint conventions
1 parent f3624ea commit 151bf8d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

benchmark_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/julienschmidt/httprouter"
1010
)
1111

12-
func Benchmark_Simple(b *testing.B) {
12+
func BenchmarkSimple(b *testing.B) {
1313
g := New()
1414
g.Get("/simple", http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
1515
fmt.Fprintf(rw, "hello")
@@ -31,7 +31,7 @@ func Benchmark_Simple(b *testing.B) {
3131
}
3232
}
3333

34-
func Benchmark_Middleware(b *testing.B) {
34+
func BenchmarkMiddleware(b *testing.B) {
3535
g := New()
3636
g.Sub("/a", func(a *Composer) {
3737
a.Use().Func(func(rw http.ResponseWriter, r *http.Request) {

gonion_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func TestAppInitialization(t *testing.T) {
1212
Convey("When building the routes", t, func() {
1313
Convey("The route handler is built", func() {
1414
g := New()
15-
g.Handle("GET", "/index2", http.HandlerFunc(get_index2))
15+
g.Handle("GET", "/index2", http.HandlerFunc(getIndex2))
1616
routes := g.BuildRoutes()
1717
route := routes.routeFor("*", "/index2")
1818
recorder := httptest.NewRecorder()
@@ -47,7 +47,7 @@ func TestChainWrappingSemantics(t *testing.T) {
4747
})
4848
g.Use().ChainLink(wrapperHandler)
4949
g.Use().ChainLink(wrapperHandler)
50-
g.Handle("GET", "/index2", http.HandlerFunc(get_index2))
50+
g.Handle("GET", "/index2", http.HandlerFunc(getIndex2))
5151
routes := g.BuildRoutes()
5252
route := routes.routeFor("*", "/index2")
5353
recorder := httptest.NewRecorder()
@@ -169,6 +169,6 @@ func (routes Routes) routeFor(method string, pattern string) *Route {
169169
return nil
170170
}
171171

172-
func get_index2(rw http.ResponseWriter, r *http.Request) {
172+
func getIndex2(rw http.ResponseWriter, r *http.Request) {
173173
rw.Write([]byte("Success!"))
174174
}

0 commit comments

Comments
 (0)