Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import context from standard package #101

Merged
merged 2 commits into from
Feb 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package auth

import (
"context"
"crypto/rsa"
"crypto/x509"
"encoding/json"
Expand All @@ -25,7 +26,6 @@ import (
"strings"

"firebase.google.com/go/internal"
"golang.org/x/net/context"
"google.golang.org/api/identitytoolkit/v3"
"google.golang.org/api/transport"
)
Expand Down
2 changes: 1 addition & 1 deletion auth/auth_appengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package auth

import (
"golang.org/x/net/context"
"context"

"google.golang.org/appengine"
)
Expand Down
2 changes: 1 addition & 1 deletion auth/auth_std.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package auth

import "golang.org/x/net/context"
import "context"

func newSigner(ctx context.Context) (signer, error) {
return serviceAcctSigner{}, nil
Expand Down
2 changes: 1 addition & 1 deletion auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package auth

import (
"context"
"encoding/json"
"errors"
"fmt"
Expand All @@ -25,7 +26,6 @@ import (
"testing"
"time"

"golang.org/x/net/context"
"golang.org/x/oauth2/google"

"google.golang.org/api/option"
Expand Down
2 changes: 1 addition & 1 deletion auth/user_mgt.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package auth

import (
"context"
"encoding/json"
"fmt"
"net/http"
Expand All @@ -23,7 +24,6 @@ import (
"strings"
"time"

"golang.org/x/net/context"
"google.golang.org/api/identitytoolkit/v3"
"google.golang.org/api/iterator"
)
Expand Down
2 changes: 1 addition & 1 deletion auth/user_mgt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package auth

import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
Expand All @@ -28,7 +29,6 @@ import (

"firebase.google.com/go/internal"

"golang.org/x/net/context"
"golang.org/x/oauth2"
"google.golang.org/api/identitytoolkit/v3"
"google.golang.org/api/iterator"
Expand Down
2 changes: 1 addition & 1 deletion firebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package firebase

import (
"context"
"encoding/json"
"errors"
"io/ioutil"
Expand All @@ -31,7 +32,6 @@ import (
"firebase.google.com/go/messaging"
"firebase.google.com/go/storage"

"golang.org/x/net/context"
"golang.org/x/oauth2/google"
"google.golang.org/api/option"
"google.golang.org/api/transport"
Expand Down
2 changes: 1 addition & 1 deletion firebase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package firebase

import (
"context"
"fmt"
"io/ioutil"
"log"
Expand All @@ -32,7 +33,6 @@ import (

"encoding/json"

"golang.org/x/net/context"
"golang.org/x/oauth2"
"google.golang.org/api/option"
)
Expand Down
3 changes: 1 addition & 2 deletions iid/iid.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
package iid

import (
"context"
"errors"
"fmt"
"net/http"

"google.golang.org/api/transport"

"firebase.google.com/go/internal"

"golang.org/x/net/context"
)

const iidEndpoint = "https://console.firebase.google.com/v1"
Expand Down
3 changes: 1 addition & 2 deletions iid/iid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package iid

import (
"context"
"fmt"
"net/http"
"net/http/httptest"
Expand All @@ -23,8 +24,6 @@ import (
"google.golang.org/api/option"

"firebase.google.com/go/internal"

"golang.org/x/net/context"
)

var testIIDConfig = &internal.InstanceIDConfig{
Expand Down
3 changes: 1 addition & 2 deletions integration/auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package auth

import (
"bytes"
"context"
"encoding/json"
"flag"
"fmt"
Expand All @@ -29,8 +30,6 @@ import (

"firebase.google.com/go/auth"
"firebase.google.com/go/integration/internal"

"golang.org/x/net/context"
)

const apiURL = "https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyCustomToken?key=%s"
Expand Down
3 changes: 1 addition & 2 deletions integration/auth/user_mgt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package auth

import (
"context"
"fmt"
"reflect"
"testing"
Expand All @@ -24,8 +25,6 @@ import (
"google.golang.org/api/iterator"

"firebase.google.com/go/auth"

"golang.org/x/net/context"
)

var testFixtures = struct {
Expand Down
3 changes: 1 addition & 2 deletions integration/firestore/firestore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
package firestore

import (
"context"
"log"
"reflect"
"testing"

"firebase.google.com/go/integration/internal"

"golang.org/x/net/context"
)

func TestFirestore(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions integration/iid/iid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
package iid

import (
"context"
"flag"
"log"
"os"
"testing"

"firebase.google.com/go/iid"
"firebase.google.com/go/integration/internal"

"golang.org/x/net/context"
)

var client *iid.Client
Expand Down
3 changes: 1 addition & 2 deletions integration/internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
package internal

import (
"context"
"encoding/json"
"go/build"
"io/ioutil"
"path/filepath"
"strings"

"golang.org/x/net/context"

firebase "firebase.google.com/go"
"google.golang.org/api/option"
)
Expand Down
3 changes: 1 addition & 2 deletions integration/messaging/messaging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
package messaging

import (
"context"
"flag"
"log"
"os"
"regexp"
"testing"

"golang.org/x/net/context"

"firebase.google.com/go/integration/internal"
"firebase.google.com/go/messaging"
)
Expand Down
2 changes: 1 addition & 1 deletion integration/storage/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package storage

import (
"context"
"flag"
"fmt"
"io/ioutil"
Expand All @@ -25,7 +26,6 @@ import (
gcs "cloud.google.com/go/storage"
"firebase.google.com/go/integration/internal"
"firebase.google.com/go/storage"
"golang.org/x/net/context"
)

var ctx context.Context
Expand Down
3 changes: 1 addition & 2 deletions internal/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ package internal

import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"

"golang.org/x/net/context"
)

// HTTPClient is a convenient API to make HTTP calls.
Expand Down
3 changes: 1 addition & 2 deletions internal/http_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
package internal

import (
"context"
"encoding/json"
"io/ioutil"
"net/http"
"net/http/httptest"
"reflect"
"testing"

"golang.org/x/net/context"
)

var cases = []struct {
Expand Down
3 changes: 1 addition & 2 deletions messaging/messaging.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package messaging

import (
"context"
"encoding/json"
"errors"
"fmt"
Expand All @@ -25,8 +26,6 @@ import (
"strings"
"time"

"golang.org/x/net/context"

"firebase.google.com/go/internal"
"google.golang.org/api/transport"
)
Expand Down
2 changes: 1 addition & 1 deletion messaging/messaging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package messaging

import (
"context"
"encoding/json"
"io/ioutil"
"net/http"
Expand All @@ -25,7 +26,6 @@ import (
"time"

"firebase.google.com/go/internal"
"golang.org/x/net/context"
"google.golang.org/api/option"
)

Expand Down
2 changes: 1 addition & 1 deletion snippets/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
package snippets

import (
"context"
"log"

firebase "firebase.google.com/go"
"firebase.google.com/go/auth"
"golang.org/x/net/context"
"google.golang.org/api/iterator"
)

Expand Down
2 changes: 1 addition & 1 deletion snippets/messaging.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
package snippets

import (
"context"
"fmt"
"log"
"time"

"firebase.google.com/go"
"firebase.google.com/go/messaging"
"golang.org/x/net/context"
)

func sendToToken(app *firebase.App) {
Expand Down
3 changes: 1 addition & 2 deletions storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
package storage

import (
"context"
"errors"

"cloud.google.com/go/storage"
"firebase.google.com/go/internal"

"golang.org/x/net/context"
)

// Client is the interface for the Firebase Storage service.
Expand Down
2 changes: 1 addition & 1 deletion storage/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
package storage

import (
"context"
"testing"

"google.golang.org/api/option"

"firebase.google.com/go/internal"
"golang.org/x/net/context"
)

var opts = []option.ClientOption{
Expand Down