Skip to content

Commit

Permalink
Add Go modules support.
Browse files Browse the repository at this point in the history
  • Loading branch information
xStrom committed May 24, 2019
1 parent cfc72ed commit d3dc66f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
17 changes: 13 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ sudo: false
language: go

go:
- 1.3.3
- 1.4.2
- 1.5.2
- 1.6beta2
- 1.3.x
- 1.4.x
- 1.5.x
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x

env:
- GO111MODULE=on

# Get deps, build, test, and ensure the code is gofmt'ed.
script:
Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/yohcop/openid-go

go 1.3

require golang.org/x/net v0.0.0-20190522155817-f3200d17e092
5 changes: 5 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190522155817-f3200d17e092 h1:4QSRKanuywn15aTZvI/mIDEgPQpswuFndXpOj3rKEco=
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
2 changes: 1 addition & 1 deletion nonce_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (d *SimpleNonceStore) Accept(endpoint, nonce string) error {
now := time.Now()
diff := now.Sub(ts)
if diff > *maxNonceAge {
return fmt.Errorf("Nonce too old: %ds", diff.Seconds())
return fmt.Errorf("Nonce too old: %.2fs", diff.Seconds())
}

s := nonce[20:]
Expand Down

0 comments on commit d3dc66f

Please sign in to comment.