Skip to content

Commit 0c849e9

Browse files
tbpgavishalom
authored andcommitted
Support Go 1.6 (#120)
* all: use golang.org/x/net/context * internal: use ctxhttp to use /x/ context The 1.6 Request type doesn't have WithContext. * all: don't use subtests to keep 1.6 compatibility * integration: use float64 for fields with exp value Values like -7e+07 cannot be parsed into ints in Go 1.6. So, use floats instead. * integration/messaging: use t.Fatal not log.Fatal * travis: add 1.6.x * changelog: mention addition of 1.6 support * readme: mention go version support
1 parent 9bd56f9 commit 0c849e9

32 files changed

+101
-85
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: go
22

33
go:
4+
- 1.6.x
45
- 1.7.x
56
- 1.8.x
67
- 1.9.x

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
22

3+
- [added] Added support for Go 1.6.
34
- [changed] Fixed a bug in the
45
[`UnsubscribeFromTopic()`](https://godoc.org/firebase.google.com/go/messaging#Client.UnsubscribeFromTopic)
56
function.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Admin Go SDK enables access to Firebase services from privileged environments
2020
(such as servers or cloud) in Go. Currently this SDK provides
2121
Firebase custom authentication support.
2222

23+
Go versions >= 1.6 are supported.
24+
2325
For more information, visit the
2426
[Firebase Admin SDK setup guide](https://firebase.google.com/docs/admin/setup/).
2527

auth/auth.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
package auth
1717

1818
import (
19-
"context"
2019
"crypto/rsa"
2120
"crypto/x509"
2221
"encoding/json"
@@ -25,6 +24,8 @@ import (
2524
"fmt"
2625
"strings"
2726

27+
"golang.org/x/net/context"
28+
2829
"firebase.google.com/go/internal"
2930
"google.golang.org/api/identitytoolkit/v3"
3031
"google.golang.org/api/transport"

auth/auth_appengine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package auth
1818

1919
import (
20-
"context"
20+
"golang.org/x/net/context"
2121

2222
"google.golang.org/appengine"
2323
)

auth/auth_std.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package auth
1818

19-
import "context"
19+
import "golang.org/x/net/context"
2020

2121
func newSigner(ctx context.Context) (signer, error) {
2222
return serviceAcctSigner{}, nil

auth/auth_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package auth
1616

1717
import (
18-
"context"
1918
"encoding/json"
2019
"errors"
2120
"fmt"
@@ -26,6 +25,8 @@ import (
2625
"testing"
2726
"time"
2827

28+
"golang.org/x/net/context"
29+
2930
"golang.org/x/oauth2/google"
3031

3132
"google.golang.org/api/option"

auth/user_mgt.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package auth
1616

1717
import (
18-
"context"
1918
"encoding/json"
2019
"fmt"
2120
"net/http"
@@ -24,6 +23,8 @@ import (
2423
"strings"
2524
"time"
2625

26+
"golang.org/x/net/context"
27+
2728
"google.golang.org/api/identitytoolkit/v3"
2829
"google.golang.org/api/iterator"
2930
)

auth/user_mgt_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ package auth
1616

1717
import (
1818
"bytes"
19-
"context"
2019
"encoding/json"
2120
"fmt"
2221
"io/ioutil"
@@ -27,6 +26,8 @@ import (
2726
"testing"
2827
"time"
2928

29+
"golang.org/x/net/context"
30+
3031
"firebase.google.com/go/internal"
3132

3233
"golang.org/x/oauth2"

firebase.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
package firebase
1919

2020
import (
21-
"context"
2221
"encoding/json"
2322
"errors"
2423
"io/ioutil"
2524
"os"
2625

26+
"golang.org/x/net/context"
27+
2728
"cloud.google.com/go/firestore"
2829

2930
"firebase.google.com/go/auth"

0 commit comments

Comments
 (0)