Skip to content

Commit

Permalink
upgrade to go 1.12.x
Browse files Browse the repository at this point in the history
  • Loading branch information
alexferl committed Jun 28, 2019
1 parent fb0c7bb commit 72b221c
Show file tree
Hide file tree
Showing 12 changed files with 178 additions and 60 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.11.2-alpine as builder
FROM golang:1.12.6-alpine as builder
MAINTAINER Alexandre Ferland <aferlandqc@gmail.com>

ENV GO111MODULE=on
Expand All @@ -18,5 +18,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build

FROM scratch
COPY --from=builder /build/brevis /brevis

EXPOSE 1323

ENTRYPOINT ["/brevis", "--address", "0.0.0.0"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Alexandre Ferland
Copyright (c) 2019 Alexandre Ferland

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion backend/interfaces.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package backend

import (
"github.com/admiralobvious/brevis/model"
"brevis/model"
)

// Backend a common interface for all backends
Expand Down
6 changes: 3 additions & 3 deletions backend/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"fmt"
"time"

"github.com/admiralobvious/brevis/model"
"github.com/admiralobvious/brevis/util"

"github.com/globalsign/mgo"
"github.com/globalsign/mgo/bson"
"github.com/jpillora/backoff"
"github.com/sirupsen/logrus"

"brevis/model"
"brevis/util"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions factories.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package main
import (
"strings"

"github.com/admiralobvious/brevis/backend"

"github.com/sirupsen/logrus"
"github.com/spf13/viper"

"brevis/backend"
)

func BackendFactory() backend.Backend {
Expand Down
21 changes: 8 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
module github.com/admiralobvious/brevis
module brevis

go 1.12

require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/bakatz/echo-logrusmiddleware v0.0.0-20180109203720-22613b9101eb
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/admiralobvious/echo-logrusmiddleware v0.0.0-20190221200043-0e1b4f482539
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8
github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7
github.com/labstack/echo v3.3.5+incompatible
github.com/labstack/gommon v0.2.8
github.com/labstack/echo/v4 v4.1.6
github.com/marksalpeter/sugar v0.0.0-20160713164314-a69afe358ea8 // indirect
github.com/marksalpeter/token v0.0.0-20180216014620-e102fa422efe
github.com/mattn/go-colorable v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.4 // indirect
github.com/marksalpeter/token v0.0.0-20190301165649-27d8e59762a8
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/sirupsen/logrus v1.2.0
github.com/sirupsen/logrus v1.4.2
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.2.1
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4 // indirect
github.com/spf13/viper v1.4.0
)
171 changes: 146 additions & 25 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion handler/handler.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package handler

import (
"github.com/admiralobvious/brevis/backend"
"brevis/backend"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion handler/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

func (h *Handler) Root(c echo.Context) error {
Expand Down
8 changes: 4 additions & 4 deletions handler/shortener.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"net/http"

"github.com/admiralobvious/brevis/model"
"github.com/admiralobvious/brevis/util"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
"github.com/spf13/viper"

"brevis/model"
"brevis/util"
)

func (h *Handler) Shorten(c echo.Context) error {
Expand Down
4 changes: 2 additions & 2 deletions model/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package model
import (
"time"

"github.com/admiralobvious/brevis/util"

"github.com/globalsign/mgo/bson"
"github.com/marksalpeter/token"

"brevis/util"
)

type UrlMapping struct {
Expand Down
12 changes: 6 additions & 6 deletions server.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package main

import (
"github.com/admiralobvious/brevis/backend"
"github.com/admiralobvious/brevis/handler"

"github.com/bakatz/echo-logrusmiddleware"
"github.com/labstack/echo"
"github.com/labstack/echo/middleware"
"github.com/admiralobvious/echo-logrusmiddleware"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"

"brevis/backend"
"brevis/handler"
)

func init() {
Expand Down

0 comments on commit 72b221c

Please sign in to comment.