Skip to content

Commit

Permalink
Update dependencies and replace uuid library (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
joohoi committed Aug 10, 2018
1 parent 8aa869b commit 75d4a30
Show file tree
Hide file tree
Showing 1,782 changed files with 105,096 additions and 40,560 deletions.
228 changes: 181 additions & 47 deletions Gopkg.lock

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ required = ["github.com/valyala/fasthttp"]
name = "github.com/rs/cors"
version = "1.2.0"

[[constraint]]
name = "github.com/satori/go.uuid"
version = "1.2.0"

[[constraint]]
name = "github.com/sirupsen/logrus"
version = "1.0.4"
Expand Down
6 changes: 3 additions & 3 deletions acmetxt.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"net"

"github.com/satori/go.uuid"
"github.com/google/uuid"
log "github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -76,8 +76,8 @@ func (a ACMETxt) allowedFromList(ips []string) bool {
func newACMETxt() ACMETxt {
var a = ACMETxt{}
password := generatePassword(40)
a.Username = uuid.NewV4()
a.Username = uuid.New()
a.Password = password
a.Subdomain = uuid.NewV4().String()
a.Subdomain = uuid.New().String()
return a
}
4 changes: 2 additions & 2 deletions api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"testing"

"github.com/gavv/httpexpect"
"github.com/google/uuid"
"github.com/julienschmidt/httprouter"
"github.com/rs/cors"
"github.com/satori/go.uuid"
"gopkg.in/DATA-DOG/go-sqlmock.v1"
)

Expand All @@ -25,7 +25,7 @@ func noAuth(update httprouter.Handle) httprouter.Handle {
dec := json.NewDecoder(r.Body)
_ = dec.Decode(&postData)
// Set user info to the decoded ACMETxt object
postData.Username, _ = uuid.FromString(uname)
postData.Username, _ = uuid.Parse(uname)
postData.Password = passwd
// Set the ACMETxt struct to context to pull in from update function
ctx := r.Context()
Expand Down
2 changes: 1 addition & 1 deletion db.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"strconv"
"time"

"github.com/google/uuid"
_ "github.com/lib/pq"
_ "github.com/mattn/go-sqlite3"
"github.com/satori/go.uuid"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/bcrypt"
)
Expand Down
5 changes: 3 additions & 2 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package main

import (
"database/sql"
"github.com/miekg/dns"
"github.com/satori/go.uuid"
"sync"

"github.com/google/uuid"
"github.com/miekg/dns"
)

// Config is global configuration struct
Expand Down
6 changes: 3 additions & 3 deletions validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package main
import (
"unicode/utf8"

"github.com/satori/go.uuid"
"github.com/google/uuid"
"golang.org/x/crypto/bcrypt"
)

func getValidUsername(u string) (uuid.UUID, error) {
uname, err := uuid.FromString(u)
uname, err := uuid.Parse(u)
if err != nil {
return uuid.UUID{}, err
}
Expand All @@ -25,7 +25,7 @@ func validKey(k string) bool {
}

func validSubdomain(s string) bool {
_, err := uuid.FromString(s)
_, err := uuid.Parse(s)
if err == nil {
return true
}
Expand Down
5 changes: 3 additions & 2 deletions validation_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package main

import (
"github.com/satori/go.uuid"
"testing"

"github.com/google/uuid"
)

func TestGetValidUsername(t *testing.T) {
v1, _ := uuid.FromString("a097455b-52cc-4569-90c8-7a4b97c6eba8")
v1, _ := uuid.Parse("a097455b-52cc-4569-90c8-7a4b97c6eba8")
for i, test := range []struct {
uname string
output uuid.UUID
Expand Down
4 changes: 1 addition & 3 deletions vendor/github.com/gavv/httpexpect/.gometalinter

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions vendor/github.com/gavv/httpexpect/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

201 changes: 201 additions & 0 deletions vendor/github.com/gavv/httpexpect/value_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions vendor/github.com/google/uuid/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions vendor/github.com/google/uuid/CONTRIBUTING.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions vendor/github.com/google/uuid/CONTRIBUTORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 75d4a30

Please sign in to comment.