Skip to content

Commit

Permalink
Go Mod & Vendor Update
Browse files Browse the repository at this point in the history
@mensan3 `go mod`
  • Loading branch information
rebootcode committed May 22, 2021
1 parent 4dccc6e commit 2b1662b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module shortlink
module github.com/go-awesome/shortlink

go 1.14

require (
github.com/akrylysov/pogreb v0.10.1
github.com/dgraph-io/badger/v3 v3.2011.1
github.com/gofiber/fiber/v2 v2.9.0
github.com/gofiber/fiber/v2 v2.10.0
github.com/rs/xid v1.3.0
github.com/speps/go-hashids/v2 v2.0.1
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
github.com/go-delve/delve v1.5.0/go.mod h1:c6b3a1Gry6x8a4LGCe/CWzrocrfaHvkUxCj3k4bvSUQ=
github.com/gofiber/fiber/v2 v2.9.0 h1:sZsTKlbyGGZ0UdTUn3ItQv5J9FTQUc4J3OS+03lE5m0=
github.com/gofiber/fiber/v2 v2.9.0/go.mod h1:Ah3IJikrKNRepl/HuVawppS25X7FWohwfCSRn7kJG28=
github.com/gofiber/fiber/v2 v2.10.0 h1:cYwonWaFVa7wBd/LKhgKu7mFNg2CHv5ztY6gzXtrvW8=
github.com/gofiber/fiber/v2 v2.10.0/go.mod h1:Ah3IJikrKNRepl/HuVawppS25X7FWohwfCSRn7kJG28=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down
3 changes: 2 additions & 1 deletion handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package handler

import (
"encoding/json"
"shortlink/helper"
"strconv"
"strings"
"time"

"github.com/go-awesome/shortlink/helper"

"github.com/akrylysov/pogreb"
"github.com/dgraph-io/badger/v3"
"github.com/gofiber/fiber/v2"
Expand Down
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"os"
"os/signal"
"runtime"
"shortlink/handler"
"shortlink/helper"
"time"

"github.com/go-awesome/shortlink/handler"
"github.com/go-awesome/shortlink/helper"

"github.com/akrylysov/pogreb"
badger "github.com/dgraph-io/badger/v3"
"github.com/gofiber/fiber/v2"
Expand Down Expand Up @@ -61,7 +62,7 @@ func main() {
Prefork: false,
CaseSensitive: false,
StrictRouting: true,
DisableStartupMessage: false,
DisableStartupMessage: true,
ErrorHandler: func(c *fiber.Ctx, err error) error {
code := fiber.StatusInternalServerError
if e, ok := err.(*fiber.Error); ok {
Expand Down
4 changes: 4 additions & 0 deletions rest.http
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ Authorization: "Bearer 1234567812345678123456781234567"
"long": "https://google.com",
"short": "N1|123ME1oJPK"
}

### Redirector page

GET http://127.0.0.1:8080/N1|123ME1oJPK HTTP/1.1

0 comments on commit 2b1662b

Please sign in to comment.