Fix epic typo :O

This commit is contained in:
2016-07-11 18:16:57 +01:00
parent e3ec2ff16c
commit cbdd5790bd
9 changed files with 42 additions and 42 deletions

View File

@@ -5,19 +5,19 @@ import (
"fmt"
"net/url"
"github.com/jimeh/ozu.io/shortner"
"github.com/jimeh/ozu.io/shortener"
"github.com/qiangxue/fasthttp-routing"
"github.com/valyala/fasthttp"
)
// Handlers handle HTTP requests.
type Handlers struct {
s *shortner.Shortner
s *shortener.Shortener
}
// Index handles requests for root.
func (h *Handlers) Index(c *routing.Context) error {
c.WriteString("Welcome to ozu.io, a shitty URL shortner.")
c.WriteString("Welcome to ozu.io, a shitty URL shortener.")
return nil
}

View File

@@ -1,14 +1,14 @@
package web
import (
"github.com/jimeh/ozu.io/shortner"
"github.com/jimeh/ozu.io/shortener"
"github.com/qiangxue/fasthttp-routing"
)
// NewRouter creates a new routing.Router with all handlers registered.
func NewRouter(shortner *shortner.Shortner) *routing.Router {
func NewRouter(shortener *shortener.Shortener) *routing.Router {
router := routing.New()
handlers := Handlers{shortner}
handlers := Handlers{shortener}
router.Get("/", handlers.Index)
router.Get("/api/shorten", handlers.Shorten)