Skip to content

Commit 943d1f3

Browse files
authored
Merge pull request #16 from vgarvardt/patch/go-mod-oauth2-pkg
Updated package to use go-mod compatible oauth2
2 parents ecaf9b1 + 89f7bd0 commit 943d1f3

File tree

7 files changed

+97
-16
lines changed

7 files changed

+97
-16
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
schedule:
9+
- cron: '0 9 * * 1'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
with:
20+
# We must fetch at least the immediate parents so that if this is
21+
# a pull request then we can checkout the head.
22+
fetch-depth: 2
23+
24+
# If this run was triggered by a pull request event, then checkout
25+
# the head of the pull request instead of the merge commit.
26+
- run: git checkout HEAD^2
27+
if: ${{ github.event_name == 'pull_request' }}
28+
29+
# Initializes the CodeQL tools for scanning.
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v1
32+
with:
33+
languages: go
34+
35+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
36+
# If this step fails, then you should remove it and run the build manually (see below)
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v1
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v1

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Storage major version matches [OAuth 2.0](https://github.com/go-oauth2/oauth2) major version,
1111
so use corresponding version (go modules compliant)
1212

13-
For `gopkg.in/oauth2.v4`:
13+
For `github.com/go-oauth2/oauth2/v4`:
1414

1515
```bash
1616
$ go get -u github.com/vgarvardt/go-oauth2-pg/v4
@@ -33,10 +33,10 @@ import (
3333
"os"
3434
"time"
3535

36+
"github.com/go-oauth2/oauth2/v4/manage"
3637
"github.com/jackc/pgx/v4"
3738
pg "github.com/vgarvardt/go-oauth2-pg/v4"
3839
"github.com/vgarvardt/go-pg-adapter/pgx4adapter"
39-
"gopkg.in/oauth2.v4/manage"
4040
)
4141

4242
func main() {

client_store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"log"
88
"os"
99

10-
"gopkg.in/oauth2.v4"
11-
"gopkg.in/oauth2.v4/models"
10+
"github.com/go-oauth2/oauth2/v4"
11+
"github.com/go-oauth2/oauth2/v4/models"
1212

1313
pgAdapter "github.com/vgarvardt/go-pg-adapter"
1414
)

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ module github.com/vgarvardt/go-oauth2-pg/v4
33
go 1.14
44

55
require (
6-
github.com/jackc/pgx/v4 v4.6.0
6+
github.com/go-oauth2/oauth2/v4 v4.1.0
7+
github.com/jackc/pgx/v4 v4.7.1
78
github.com/jmoiron/sqlx v1.2.0
89
github.com/stretchr/testify v1.6.1
910
github.com/vgarvardt/go-pg-adapter v1.0.0
10-
gopkg.in/oauth2.v4 v4.0.0
1111
)

go.sum

Lines changed: 47 additions & 7 deletions
Large diffs are not rendered by default.

token_store.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"os"
99
"time"
1010

11-
"gopkg.in/oauth2.v4"
12-
"gopkg.in/oauth2.v4/models"
11+
"github.com/go-oauth2/oauth2/v4"
12+
"github.com/go-oauth2/oauth2/v4/models"
1313

1414
pgAdapter "github.com/vgarvardt/go-pg-adapter"
1515
)

token_store_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import (
99
"testing"
1010
"time"
1111

12+
"github.com/go-oauth2/oauth2/v4/models"
1213
"github.com/jackc/pgx/v4"
1314
"github.com/jackc/pgx/v4/pgxpool"
1415
_ "github.com/jackc/pgx/v4/stdlib"
1516
"github.com/jmoiron/sqlx"
1617
"github.com/stretchr/testify/assert"
1718
"github.com/stretchr/testify/mock"
1819
"github.com/stretchr/testify/require"
19-
"gopkg.in/oauth2.v4/models"
2020

2121
pgAdapter "github.com/vgarvardt/go-pg-adapter"
2222
"github.com/vgarvardt/go-pg-adapter/pgx4adapter"

0 commit comments

Comments
 (0)