Skip to content

Commit

Permalink
Move to go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondl committed Jul 3, 2020
1 parent 08fa0a6 commit 3a5c333
Show file tree
Hide file tree
Showing 59 changed files with 123 additions and 92 deletions.
2 changes: 1 addition & 1 deletion auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"golang.org/x/crypto/bcrypt"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net/http/httptest"
"testing"

This comment has been minimized.

Copy link
@Botino888

Botino888 Feb 25, 2023

"Tôi"


"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/mocks"
"github.com/volatiletech/authboss/v3"
"github.com/volatiletech/authboss/v3/mocks"
)

func TestAuthInit(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion authboss.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"net/url"
"path"

"github.com/pkg/errors"
"github.com/friendsofgo/errors"
"golang.org/x/crypto/bcrypt"
)

Expand Down
4 changes: 2 additions & 2 deletions confirm/confirm.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"net/url"
"path"

"github.com/pkg/errors"
"github.com/friendsofgo/errors"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions confirm/confirm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"net/http/httptest"
"testing"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/mocks"
"github.com/volatiletech/authboss/v3"
"github.com/volatiletech/authboss/v3/mocks"
)

func TestInit(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package defaults
import (
"os"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

// SetCore creates instances of all the default pieces
Expand Down
2 changes: 1 addition & 1 deletion defaults/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package defaults
import (
"testing"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

func TestSetCore(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion defaults/error_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

// ErrorHandler wraps http handlers with errors with itself
Expand Down
2 changes: 1 addition & 1 deletion defaults/error_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"testing"

"github.com/pkg/errors"
"github.com/friendsofgo/errors"
)

func TestErrorHandler(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion defaults/log_mailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"context"
"io"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

// LogMailer logs e-mails instead of sending them.
Expand Down
2 changes: 1 addition & 1 deletion defaults/log_mailer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"testing"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

func TestMailer(t *testing.T) {
Expand Down
3 changes: 0 additions & 3 deletions defaults/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"bytes"
"regexp"
"testing"

"github.com/davecgh/go-spew/spew"
)

func TestLogger(t *testing.T) {
Expand All @@ -21,6 +19,5 @@ func TestLogger(t *testing.T) {
rgx := regexp.MustCompile(rgxTimestamp + ` \[INFO\]: hello\n` + rgxTimestamp + ` \[EROR\]: world\n`)
if !rgx.Match(b.Bytes()) {
t.Errorf("output from log file did not match regex:\n%s\n%v", b.String(), b.Bytes())
spew.Dump(b.Bytes())
}
}
2 changes: 1 addition & 1 deletion defaults/renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"encoding/json"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion defaults/renderer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

func TestJSONRenderer(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion defaults/responder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"strings"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

// Responder helps respond to http requests
Expand Down
4 changes: 2 additions & 2 deletions defaults/responder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"reflect"
"testing"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/mocks"
"github.com/volatiletech/authboss/v3"
"github.com/volatiletech/authboss/v3/mocks"
)

type testRenderer struct {
Expand Down
4 changes: 2 additions & 2 deletions defaults/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"regexp"
"unicode"

"github.com/pkg/errors"
"github.com/volatiletech/authboss"
"github.com/friendsofgo/errors"
"github.com/volatiletech/authboss/v3"
)

var blankRegex = regexp.MustCompile(`^\s*$`)
Expand Down
4 changes: 2 additions & 2 deletions defaults/smtp_mailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"text/template"
"time"

"github.com/pkg/errors"
"github.com/volatiletech/authboss"
"github.com/friendsofgo/errors"
"github.com/volatiletech/authboss/v3"
)

// NewSMTPMailer creates an SMTP Mailer to send emails with.
Expand Down
2 changes: 1 addition & 1 deletion defaults/smtp_mailer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/smtp"
"testing"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion defaults/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package defaults
import (
"fmt"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

// HTTPFormValidator validates HTTP post type inputs
Expand Down
2 changes: 1 addition & 1 deletion defaults/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package defaults
import (
"testing"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

func TestValidate(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions defaults/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/url"
"regexp"

"github.com/pkg/errors"
"github.com/volatiletech/authboss"
"github.com/friendsofgo/errors"
"github.com/volatiletech/authboss/v3"
)

// FormValue types
Expand Down
4 changes: 2 additions & 2 deletions defaults/values_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"testing"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/mocks"
"github.com/volatiletech/authboss/v3"
"github.com/volatiletech/authboss/v3/mocks"
)

func TestHTTPBodyReaderLogin(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"testing"

"github.com/pkg/errors"
"github.com/friendsofgo/errors"
)

func TestEvents(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion expire/expire.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"time"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

var nowTime = time.Now
Expand Down
4 changes: 2 additions & 2 deletions expire/expire_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/mocks"
"github.com/volatiletech/authboss/v3"
"github.com/volatiletech/authboss/v3/mocks"
)

func TestExpireSetup(t *testing.T) {
Expand Down
11 changes: 11 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module github.com/volatiletech/authboss/v3

go 1.14

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/friendsofgo/errors v0.9.2
github.com/pquerna/otp v1.2.0
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
)
23 changes: 23 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/friendsofgo/errors v0.9.2/go.mod h1:yCvFW5AkDIL9qn7suHVLiI/gH228n7PC4Pn44IGoTOI=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
2 changes: 1 addition & 1 deletion lock/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"time"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

// Storage key constants
Expand Down
4 changes: 2 additions & 2 deletions lock/lock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/mocks"
"github.com/volatiletech/authboss/v3"
"github.com/volatiletech/authboss/v3/mocks"
)

func TestInit(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions logout/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ package logout
import (
"net/http"

"github.com/pkg/errors"
"github.com/volatiletech/authboss"
"github.com/friendsofgo/errors"
"github.com/volatiletech/authboss/v3"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions logout/logout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/mocks"
"github.com/volatiletech/authboss/v3"
"github.com/volatiletech/authboss/v3/mocks"
)

func TestLogout(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions mocks/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"
"time"

"github.com/pkg/errors"
"github.com/volatiletech/authboss"
"github.com/friendsofgo/errors"
"github.com/volatiletech/authboss/v3"
)

// User represents all possible fields a authboss User may have
Expand Down
4 changes: 2 additions & 2 deletions oauth2/oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ import (
"sort"
"strings"

"github.com/pkg/errors"
"github.com/friendsofgo/errors"
"golang.org/x/oauth2"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/v3"
)

// FormValue constants
Expand Down
4 changes: 2 additions & 2 deletions oauth2/oauth2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"testing"
"time"

"github.com/volatiletech/authboss"
"github.com/volatiletech/authboss/mocks"
"github.com/volatiletech/authboss/v3"
"github.com/volatiletech/authboss/v3/mocks"
"golang.org/x/oauth2"
"golang.org/x/oauth2/facebook"
"golang.org/x/oauth2/google"
Expand Down
2 changes: 1 addition & 1 deletion oauth2/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io/ioutil"
"net/http"

"github.com/pkg/errors"
"github.com/friendsofgo/errors"
"golang.org/x/oauth2"
)

Expand Down
4 changes: 2 additions & 2 deletions otp/otp.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"strconv"
"strings"

"github.com/pkg/errors"
"github.com/volatiletech/authboss"
"github.com/friendsofgo/errors"
"github.com/volatiletech/authboss/v3"
)

const (
Expand Down
Loading

0 comments on commit 3a5c333

Please sign in to comment.