feat: check unused package (#232)

* feat: check unused package

update edganiukov/fcm to appleboy/go-fcm

* update readme

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update comment

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2017-06-01 02:52:01 -05:00
committed by GitHub
parent 77bce18c9f
commit 14dc899b02
42 changed files with 47 additions and 2661 deletions

64
vendor/github.com/appleboy/go-fcm/README.md generated vendored Normal file
View File

@@ -0,0 +1,64 @@
# go-fcm
[![GoDoc](https://godoc.org/github.com/edganiukov/fcm?status.svg)](https://godoc.org/github.com/edganiukov/fcm)
[![Build Status](https://travis-ci.org/edganiukov/fcm.svg?branch=master)](https://travis-ci.org/edganiukov/fcm)
[![Go Report Card](https://goreportcard.com/badge/github.com/edganiukov/fcm)](https://goreportcard.com/report/github.com/edganiukov/fcm)
This project was forked from [github.com/edganiukov/fcmfcm](https://github.com/edganiukov/fcm).
Golang client library for Firebase Cloud Messaging. Implemented only [HTTP client](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream).
More information on [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)
## Getting Started
To install fcm, use `go get`:
```bash
go get github.com/appleboy/go-fcm
```
or `govendor`:
```bash
govendor fetch github.com/appleboy/go-fcm
```
or other tool for vendoring.
## Sample Usage
Here is a simple example illustrating how to use FCM library:
```go
package main
import (
"github.com/edganiukov/fcm"
)
func main() {
// Create the message to be sent.
msg := &fcm.Message{
Token: "sample_device_token",
Data: map[string]interface{}{
"foo": "bar",
}
}
// Create a FCM client to send the message.
client := fcm.NewClient("sample_api_key")
// Send the message and receive the response without retries.
response, err := client.Send(msg)
if err != nil {
/* ... */
}
/* ... */
}
```
#### TODO:
---------
- [ ] Retry only failed messages while multicast messaging.