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

28
vendor/github.com/appleboy/go-fcm/option.go generated vendored Normal file
View File

@@ -0,0 +1,28 @@
package fcm
import (
"errors"
"net/http"
)
// Option configurates Client with defined option.
type Option func(*Client) error
// WithEndpoint returns Option to configure FCM Endpoint.
func WithEndpoint(endpoint string) Option {
return func(c *Client) error {
if endpoint == "" {
return errors.New("invalid endpoint")
}
c.endpoint = endpoint
return nil
}
}
// WithHTTPClient returns Option to configure HTTP Client.
func WithHTTPClient(httpClient *http.Client) Option {
return func(c *Client) error {
c.client = httpClient
return nil
}
}