Remove old interfaces and interfaces that are not recommended (#236)
* Remove the old deprecated channel interface.
* Remove the old deprecated file interface.
* Remove the old deprecated xmpp interface.
* Removing the cloudsql interface, which is not recommended.
* Removing the aebundler interface, which has been deprecated for some time.
diff --git a/channel/channel.go b/channel/channel.go
deleted file mode 100644
index 40edd32..0000000
--- a/channel/channel.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-/*
-Package channel implements the server side of App Engine's Channel API.
-
-Create creates a new channel associated with the given clientID,
-which must be unique to the client that will use the returned token.
-
- token, err := channel.Create(c, "player1")
- if err != nil {
- // handle error
- }
- // return token to the client in an HTTP response
-
-Send sends a message to the client over the channel identified by clientID.
-
- channel.Send(c, "player1", "Game over!")
-
-Deprecated: The Channel API feature has been deprecated and is going to be removed. See the Channel API Turndown document for details and timetable.
-
-https://cloud.google.com/appengine/docs/deprecations/channel
-*/
-package channel // import "google.golang.org/appengine/channel"
-
-import (
- "context"
- "encoding/json"
-
- "google.golang.org/appengine"
- "google.golang.org/appengine/internal"
- basepb "google.golang.org/appengine/internal/base"
- pb "google.golang.org/appengine/internal/channel"
-)
-
-// Create creates a channel and returns a token for use by the client.
-// The clientID is an application-provided string used to identify the client.
-func Create(c context.Context, clientID string) (token string, err error) {
- req := &pb.CreateChannelRequest{
- ApplicationKey: &clientID,
- }
- resp := &pb.CreateChannelResponse{}
- err = internal.Call(c, service, "CreateChannel", req, resp)
- token = resp.GetToken()
- return token, remapError(err)
-}
-
-// Send sends a message on the channel associated with clientID.
-func Send(c context.Context, clientID, message string) error {
- req := &pb.SendMessageRequest{
- ApplicationKey: &clientID,
- Message: &message,
- }
- resp := &basepb.VoidProto{}
- return remapError(internal.Call(c, service, "SendChannelMessage", req, resp))
-}
-
-// SendJSON is a helper function that sends a JSON-encoded value
-// on the channel associated with clientID.
-func SendJSON(c context.Context, clientID string, value interface{}) error {
- m, err := json.Marshal(value)
- if err != nil {
- return err
- }
- return Send(c, clientID, string(m))
-}
-
-// remapError fixes any APIError referencing "xmpp" into one referencing "channel".
-func remapError(err error) error {
- if e, ok := err.(*internal.APIError); ok {
- if e.Service == "xmpp" {
- e.Service = "channel"
- }
- }
- return err
-}
-
-var service = "xmpp" // prod
-
-func init() {
- if appengine.IsDevAppServer() {
- service = "channel" // dev
- }
- internal.RegisterErrorCodeMap("channel", pb.ChannelServiceError_ErrorCode_name)
-}
diff --git a/channel/channel_test.go b/channel/channel_test.go
deleted file mode 100644
index c7498eb..0000000
--- a/channel/channel_test.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-package channel
-
-import (
- "testing"
-
- "google.golang.org/appengine/internal"
-)
-
-func TestRemapError(t *testing.T) {
- err := &internal.APIError{
- Service: "xmpp",
- }
- err = remapError(err).(*internal.APIError)
- if err.Service != "channel" {
- t.Errorf("err.Service = %q, want %q", err.Service, "channel")
- }
-}
diff --git a/cloudsql/cloudsql.go b/cloudsql/cloudsql.go
deleted file mode 100644
index 4381f88..0000000
--- a/cloudsql/cloudsql.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2013 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-/*
-Package cloudsql exposes access to Google Cloud SQL databases.
-
-This package does not work in App Engine "flexible environment".
-
-This package is intended for MySQL drivers to make App Engine-specific
-connections. Applications should use this package through database/sql:
-Select a pure Go MySQL driver that supports this package, and use sql.Open
-with protocol "cloudsql" and an address of the Cloud SQL instance.
-
-A Go MySQL driver that has been tested to work well with Cloud SQL
-is the go-sql-driver:
- import "database/sql"
- import _ "github.com/go-sql-driver/mysql"
-
- db, err := sql.Open("mysql", "user@cloudsql(project-id:instance-name)/dbname")
-
-
-Another driver that works well with Cloud SQL is the mymysql driver:
- import "database/sql"
- import _ "github.com/ziutek/mymysql/godrv"
-
- db, err := sql.Open("mymysql", "cloudsql:instance-name*dbname/user/password")
-
-
-Using either of these drivers, you can perform a standard SQL query.
-This example assumes there is a table named 'users' with
-columns 'first_name' and 'last_name':
-
- rows, err := db.Query("SELECT first_name, last_name FROM users")
- if err != nil {
- log.Errorf(ctx, "db.Query: %v", err)
- }
- defer rows.Close()
-
- for rows.Next() {
- var firstName string
- var lastName string
- if err := rows.Scan(&firstName, &lastName); err != nil {
- log.Errorf(ctx, "rows.Scan: %v", err)
- continue
- }
- log.Infof(ctx, "First: %v - Last: %v", firstName, lastName)
- }
- if err := rows.Err(); err != nil {
- log.Errorf(ctx, "Row error: %v", err)
- }
-*/
-package cloudsql
-
-import (
- "errors"
- "net"
-)
-
-// Dial connects to the named Cloud SQL instance.
-func Dial(instance string) (net.Conn, error) {
- return connect(instance)
-}
-
-func connect(instance string) (net.Conn, error) {
- return nil, errors.New(`cloudsql: not supported in App Engine "flexible environment"`)
-}
diff --git a/cmd/aedeploy/aedeploy.go b/cmd/aedeploy/aedeploy.go
deleted file mode 100644
index 8093c93..0000000
--- a/cmd/aedeploy/aedeploy.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2015 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// Program aedeploy assists with deploying App Engine "flexible environment" Go apps to production.
-// A temporary directory is created; the app, its subdirectories, and all its
-// dependencies from $GOPATH are copied into the directory; then the app
-// is deployed to production with the provided command.
-//
-// The app must be in "package main".
-//
-// This command must be issued from within the root directory of the app
-// (where the app.yaml file is located).
-package main
-
-import (
- "flag"
- "fmt"
- "log"
- "os"
- "os/exec"
- "strings"
-)
-
-func usage() {
- fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
- fmt.Fprintf(os.Stderr, "\t%s gcloud --verbosity debug app deploy --version myversion ./app.yaml\tDeploy app to production\n", os.Args[0])
-}
-
-var verbose bool
-
-// vlogf logs to stderr if the "-v" flag is provided.
-func vlogf(f string, v ...interface{}) {
- if !verbose {
- return
- }
- log.Printf("[aedeploy] "+f, v...)
-}
-
-func main() {
- flag.BoolVar(&verbose, "v", false, "Verbose logging.")
- flag.Usage = usage
- flag.Parse()
- if flag.NArg() < 1 {
- usage()
- os.Exit(1)
- }
-
- notice := func() {
- fmt.Fprintln(os.Stderr, `NOTICE: aedeploy is deprecated. Just use "gcloud app deploy".`)
- }
-
- notice()
- if err := deploy(); err != nil {
- fmt.Fprintf(os.Stderr, os.Args[0]+": Error: %v\n", err)
- notice()
- fmt.Fprintln(os.Stderr, `You might need to update gcloud. Run "gcloud components update".`)
- os.Exit(1)
- }
- notice() // Make sure they see it at the end.
-}
-
-// deploy calls the provided command to deploy the app from the temporary directory.
-func deploy() error {
- vlogf("Running command %v", flag.Args())
- cmd := exec.Command(flag.Arg(0), flag.Args()[1:]...)
- cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr
- if err := cmd.Run(); err != nil {
- return fmt.Errorf("unable to run %q: %v", strings.Join(flag.Args(), " "), err)
- }
- return nil
-}
diff --git a/file/file.go b/file/file.go
deleted file mode 100644
index 649b97e..0000000
--- a/file/file.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2014 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-// Package file provides helper functions for using Google Cloud Storage.
-package file
-
-import (
- "context"
- "fmt"
-
- "google.golang.org/appengine/internal"
- aipb "google.golang.org/appengine/internal/app_identity"
-)
-
-// DefaultBucketName returns the name of this application's
-// default Google Cloud Storage bucket.
-func DefaultBucketName(c context.Context) (string, error) {
- req := &aipb.GetDefaultGcsBucketNameRequest{}
- res := &aipb.GetDefaultGcsBucketNameResponse{}
-
- err := internal.Call(c, "app_identity_service", "GetDefaultGcsBucketName", req, res)
- if err != nil {
- return "", fmt.Errorf("file: no default bucket name returned in RPC response: %v", err)
- }
- return res.GetDefaultGcsBucketName(), nil
-}
diff --git a/xmpp/xmpp.go b/xmpp/xmpp.go
deleted file mode 100644
index 5a38b42..0000000
--- a/xmpp/xmpp.go
+++ /dev/null
@@ -1,252 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-/*
-Package xmpp provides the means to send and receive instant messages
-to and from users of XMPP-compatible services.
-
-To send a message,
- m := &xmpp.Message{
- To: []string{"kaylee@example.com"},
- Body: `Hi! How's the carrot?`,
- }
- err := m.Send(c)
-
-To receive messages,
- func init() {
- xmpp.Handle(handleChat)
- }
-
- func handleChat(c context.Context, m *xmpp.Message) {
- // ...
- }
-*/
-package xmpp // import "google.golang.org/appengine/xmpp"
-
-import (
- "context"
- "errors"
- "fmt"
- "net/http"
-
- "google.golang.org/appengine"
- "google.golang.org/appengine/internal"
- pb "google.golang.org/appengine/internal/xmpp"
-)
-
-// Message represents an incoming chat message.
-type Message struct {
- // Sender is the JID of the sender.
- // Optional for outgoing messages.
- Sender string
-
- // To is the intended recipients of the message.
- // Incoming messages will have exactly one element.
- To []string
-
- // Body is the body of the message.
- Body string
-
- // Type is the message type, per RFC 3921.
- // It defaults to "chat".
- Type string
-
- // RawXML is whether the body contains raw XML.
- RawXML bool
-}
-
-// Presence represents an outgoing presence update.
-type Presence struct {
- // Sender is the JID (optional).
- Sender string
-
- // The intended recipient of the presence update.
- To string
-
- // Type, per RFC 3921 (optional). Defaults to "available".
- Type string
-
- // State of presence (optional).
- // Valid values: "away", "chat", "xa", "dnd" (RFC 3921).
- State string
-
- // Free text status message (optional).
- Status string
-}
-
-var (
- ErrPresenceUnavailable = errors.New("xmpp: presence unavailable")
- ErrInvalidJID = errors.New("xmpp: invalid JID")
-)
-
-// Handle arranges for f to be called for incoming XMPP messages.
-// Only messages of type "chat" or "normal" will be handled.
-func Handle(f func(c context.Context, m *Message)) {
- http.HandleFunc("/_ah/xmpp/message/chat/", func(_ http.ResponseWriter, r *http.Request) {
- f(appengine.NewContext(r), &Message{
- Sender: r.FormValue("from"),
- To: []string{r.FormValue("to")},
- Body: r.FormValue("body"),
- })
- })
-}
-
-// Send sends a message.
-// If any failures occur with specific recipients, the error will be an appengine.MultiError.
-func (m *Message) Send(c context.Context) error {
- req := &pb.XmppMessageRequest{
- Jid: m.To,
- Body: &m.Body,
- RawXml: &m.RawXML,
- }
- if m.Type != "" && m.Type != "chat" {
- req.Type = &m.Type
- }
- if m.Sender != "" {
- req.FromJid = &m.Sender
- }
- res := &pb.XmppMessageResponse{}
- if err := internal.Call(c, "xmpp", "SendMessage", req, res); err != nil {
- return err
- }
-
- if len(res.Status) != len(req.Jid) {
- return fmt.Errorf("xmpp: sent message to %d JIDs, but only got %d statuses back", len(req.Jid), len(res.Status))
- }
- me, any := make(appengine.MultiError, len(req.Jid)), false
- for i, st := range res.Status {
- if st != pb.XmppMessageResponse_NO_ERROR {
- me[i] = errors.New(st.String())
- any = true
- }
- }
- if any {
- return me
- }
- return nil
-}
-
-// Invite sends an invitation. If the from address is an empty string
-// the default (yourapp@appspot.com/bot) will be used.
-func Invite(c context.Context, to, from string) error {
- req := &pb.XmppInviteRequest{
- Jid: &to,
- }
- if from != "" {
- req.FromJid = &from
- }
- res := &pb.XmppInviteResponse{}
- return internal.Call(c, "xmpp", "SendInvite", req, res)
-}
-
-// Send sends a presence update.
-func (p *Presence) Send(c context.Context) error {
- req := &pb.XmppSendPresenceRequest{
- Jid: &p.To,
- }
- if p.State != "" {
- req.Show = &p.State
- }
- if p.Type != "" {
- req.Type = &p.Type
- }
- if p.Sender != "" {
- req.FromJid = &p.Sender
- }
- if p.Status != "" {
- req.Status = &p.Status
- }
- res := &pb.XmppSendPresenceResponse{}
- return internal.Call(c, "xmpp", "SendPresence", req, res)
-}
-
-var presenceMap = map[pb.PresenceResponse_SHOW]string{
- pb.PresenceResponse_NORMAL: "",
- pb.PresenceResponse_AWAY: "away",
- pb.PresenceResponse_DO_NOT_DISTURB: "dnd",
- pb.PresenceResponse_CHAT: "chat",
- pb.PresenceResponse_EXTENDED_AWAY: "xa",
-}
-
-// GetPresence retrieves a user's presence.
-// If the from address is an empty string the default
-// (yourapp@appspot.com/bot) will be used.
-// Possible return values are "", "away", "dnd", "chat", "xa".
-// ErrPresenceUnavailable is returned if the presence is unavailable.
-func GetPresence(c context.Context, to string, from string) (string, error) {
- req := &pb.PresenceRequest{
- Jid: &to,
- }
- if from != "" {
- req.FromJid = &from
- }
- res := &pb.PresenceResponse{}
- if err := internal.Call(c, "xmpp", "GetPresence", req, res); err != nil {
- return "", err
- }
- if !*res.IsAvailable || res.Presence == nil {
- return "", ErrPresenceUnavailable
- }
- presence, ok := presenceMap[*res.Presence]
- if ok {
- return presence, nil
- }
- return "", fmt.Errorf("xmpp: unknown presence %v", *res.Presence)
-}
-
-// GetPresenceMulti retrieves multiple users' presence.
-// If the from address is an empty string the default
-// (yourapp@appspot.com/bot) will be used.
-// Possible return values are "", "away", "dnd", "chat", "xa".
-// If any presence is unavailable, an appengine.MultiError is returned
-func GetPresenceMulti(c context.Context, to []string, from string) ([]string, error) {
- req := &pb.BulkPresenceRequest{
- Jid: to,
- }
- if from != "" {
- req.FromJid = &from
- }
- res := &pb.BulkPresenceResponse{}
-
- if err := internal.Call(c, "xmpp", "BulkGetPresence", req, res); err != nil {
- return nil, err
- }
-
- presences := make([]string, 0, len(res.PresenceResponse))
- errs := appengine.MultiError{}
-
- addResult := func(presence string, err error) {
- presences = append(presences, presence)
- errs = append(errs, err)
- }
-
- anyErr := false
- for _, subres := range res.PresenceResponse {
- if !subres.GetValid() {
- anyErr = true
- addResult("", ErrInvalidJID)
- continue
- }
- if !*subres.IsAvailable || subres.Presence == nil {
- anyErr = true
- addResult("", ErrPresenceUnavailable)
- continue
- }
- presence, ok := presenceMap[*subres.Presence]
- if ok {
- addResult(presence, nil)
- } else {
- anyErr = true
- addResult("", fmt.Errorf("xmpp: unknown presence %q", *subres.Presence))
- }
- }
- if anyErr {
- return presences, errs
- }
- return presences, nil
-}
-
-func init() {
- internal.RegisterErrorCodeMap("xmpp", pb.XmppServiceError_ErrorCode_name)
-}
diff --git a/xmpp/xmpp_test.go b/xmpp/xmpp_test.go
deleted file mode 100644
index c3030d3..0000000
--- a/xmpp/xmpp_test.go
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright 2011 Google Inc. All rights reserved.
-// Use of this source code is governed by the Apache 2.0
-// license that can be found in the LICENSE file.
-
-package xmpp
-
-import (
- "fmt"
- "reflect"
- "testing"
-
- "github.com/golang/protobuf/proto"
-
- "google.golang.org/appengine"
- "google.golang.org/appengine/internal/aetesting"
- pb "google.golang.org/appengine/internal/xmpp"
-)
-
-func newPresenceResponse(isAvailable bool, presence pb.PresenceResponse_SHOW, valid bool) *pb.PresenceResponse {
- return &pb.PresenceResponse{
- IsAvailable: proto.Bool(isAvailable),
- Presence: presence.Enum(),
- Valid: proto.Bool(valid),
- }
-}
-
-func setPresenceResponse(m *pb.PresenceResponse, isAvailable bool, presence pb.PresenceResponse_SHOW, valid bool) {
- m.IsAvailable = &isAvailable
- m.Presence = presence.Enum()
- m.Valid = &valid
-}
-
-func TestGetPresence(t *testing.T) {
- c := aetesting.FakeSingleContext(t, "xmpp", "GetPresence", func(in *pb.PresenceRequest, out *pb.PresenceResponse) error {
- if jid := in.GetJid(); jid != "user@example.com" {
- return fmt.Errorf("bad jid %q", jid)
- }
- setPresenceResponse(out, true, pb.PresenceResponse_CHAT, true)
- return nil
- })
-
- presence, err := GetPresence(c, "user@example.com", "")
- if err != nil {
- t.Fatalf("GetPresence: %v", err)
- }
-
- if presence != "chat" {
- t.Errorf("GetPresence: got %#v, want %#v", presence, pb.PresenceResponse_CHAT)
- }
-}
-
-func TestGetPresenceMultiSingleJID(t *testing.T) {
- c := aetesting.FakeSingleContext(t, "xmpp", "BulkGetPresence", func(in *pb.BulkPresenceRequest, out *pb.BulkPresenceResponse) error {
- if !reflect.DeepEqual(in.Jid, []string{"user@example.com"}) {
- return fmt.Errorf("bad request jids %#v", in.Jid)
- }
- out.PresenceResponse = []*pb.PresenceResponse{
- newPresenceResponse(true, pb.PresenceResponse_NORMAL, true),
- }
- return nil
- })
-
- presence, err := GetPresenceMulti(c, []string{"user@example.com"}, "")
- if err != nil {
- t.Fatalf("GetPresenceMulti: %v", err)
- }
- if !reflect.DeepEqual(presence, []string{""}) {
- t.Errorf("GetPresenceMulti: got %s, want %s", presence, []string{""})
- }
-}
-
-func TestGetPresenceMultiJID(t *testing.T) {
- c := aetesting.FakeSingleContext(t, "xmpp", "BulkGetPresence", func(in *pb.BulkPresenceRequest, out *pb.BulkPresenceResponse) error {
- if !reflect.DeepEqual(in.Jid, []string{"user@example.com", "user2@example.com"}) {
- return fmt.Errorf("bad request jids %#v", in.Jid)
- }
- out.PresenceResponse = []*pb.PresenceResponse{
- newPresenceResponse(true, pb.PresenceResponse_NORMAL, true),
- newPresenceResponse(true, pb.PresenceResponse_AWAY, true),
- }
- return nil
- })
-
- jids := []string{"user@example.com", "user2@example.com"}
- presence, err := GetPresenceMulti(c, jids, "")
- if err != nil {
- t.Fatalf("GetPresenceMulti: %v", err)
- }
- want := []string{"", "away"}
- if !reflect.DeepEqual(presence, want) {
- t.Errorf("GetPresenceMulti: got %v, want %v", presence, want)
- }
-}
-
-func TestGetPresenceMultiFromJID(t *testing.T) {
- c := aetesting.FakeSingleContext(t, "xmpp", "BulkGetPresence", func(in *pb.BulkPresenceRequest, out *pb.BulkPresenceResponse) error {
- if !reflect.DeepEqual(in.Jid, []string{"user@example.com", "user2@example.com"}) {
- return fmt.Errorf("bad request jids %#v", in.Jid)
- }
- if jid := in.GetFromJid(); jid != "bot@appspot.com" {
- return fmt.Errorf("bad from jid %q", jid)
- }
- out.PresenceResponse = []*pb.PresenceResponse{
- newPresenceResponse(true, pb.PresenceResponse_NORMAL, true),
- newPresenceResponse(true, pb.PresenceResponse_CHAT, true),
- }
- return nil
- })
-
- jids := []string{"user@example.com", "user2@example.com"}
- presence, err := GetPresenceMulti(c, jids, "bot@appspot.com")
- if err != nil {
- t.Fatalf("GetPresenceMulti: %v", err)
- }
- want := []string{"", "chat"}
- if !reflect.DeepEqual(presence, want) {
- t.Errorf("GetPresenceMulti: got %v, want %v", presence, want)
- }
-}
-
-func TestGetPresenceMultiInvalid(t *testing.T) {
- c := aetesting.FakeSingleContext(t, "xmpp", "BulkGetPresence", func(in *pb.BulkPresenceRequest, out *pb.BulkPresenceResponse) error {
- if !reflect.DeepEqual(in.Jid, []string{"user@example.com", "user2@example.com"}) {
- return fmt.Errorf("bad request jids %#v", in.Jid)
- }
- out.PresenceResponse = []*pb.PresenceResponse{
- newPresenceResponse(true, pb.PresenceResponse_EXTENDED_AWAY, true),
- newPresenceResponse(true, pb.PresenceResponse_CHAT, false),
- }
- return nil
- })
-
- jids := []string{"user@example.com", "user2@example.com"}
- presence, err := GetPresenceMulti(c, jids, "")
-
- wantErr := appengine.MultiError{nil, ErrInvalidJID}
- if !reflect.DeepEqual(err, wantErr) {
- t.Fatalf("GetPresenceMulti: got %#v, want %#v", err, wantErr)
- }
-
- want := []string{"xa", ""}
- if !reflect.DeepEqual(presence, want) {
- t.Errorf("GetPresenceMulti: got %#v, want %#v", presence, want)
- }
-}
-
-func TestGetPresenceMultiUnavailable(t *testing.T) {
- c := aetesting.FakeSingleContext(t, "xmpp", "BulkGetPresence", func(in *pb.BulkPresenceRequest, out *pb.BulkPresenceResponse) error {
- if !reflect.DeepEqual(in.Jid, []string{"user@example.com", "user2@example.com"}) {
- return fmt.Errorf("bad request jids %#v", in.Jid)
- }
- out.PresenceResponse = []*pb.PresenceResponse{
- newPresenceResponse(false, pb.PresenceResponse_AWAY, true),
- newPresenceResponse(false, pb.PresenceResponse_DO_NOT_DISTURB, true),
- }
- return nil
- })
-
- jids := []string{"user@example.com", "user2@example.com"}
- presence, err := GetPresenceMulti(c, jids, "")
-
- wantErr := appengine.MultiError{
- ErrPresenceUnavailable,
- ErrPresenceUnavailable,
- }
- if !reflect.DeepEqual(err, wantErr) {
- t.Fatalf("GetPresenceMulti: got %#v, want %#v", err, wantErr)
- }
- want := []string{"", ""}
- if !reflect.DeepEqual(presence, want) {
- t.Errorf("GetPresenceMulti: got %#v, want %#v", presence, want)
- }
-}