code: func pullSubcription(c context.Context, subscription, pubSubURL string) (*pubsub.PubsubMessage, func(), error) {
  	service, err := createPubSubService(c, pubSubURL)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	resp, err := service.Projects.Subscriptions.Pull(subscription, &pubsub.PullRequest{
  		ReturnImmediately: true,
  		MaxMessages:       1,
  	}).Context(c).Do()
  	if err != nil {
  		return nil, nil, err
  	}
  
  	switch len(resp.ReceivedMessages) {
  	case 0:
  		return nil, nil, nil
  	case 1:
  		ackID := resp.ReceivedMessages[0].AckId
  		ackCb := func() {
  			_, err := service.Projects.Subscriptions.Acknowledge(subscription, &pubsub.AcknowledgeRequest{
  				AckIds: []string{ackID},
  			}).Context(c).Do()
  			if err != nil {
  				logging.Errorf(c, "Failed to acknowledge the message - %s", err)
  			}
  		}
  		return resp.ReceivedMessages[0].Message, ackCb, nil
  	default:
  		panic(errors.New("received more than one message from PubSub while asking only one"))
  	}
  }
docs: // pullSubcription pulls one message from PubSub subscription.
  //
  // Used on dev server only. Returns the message and callback to call to
  // acknowledge the message.