remove log message.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-04-11 14:54:37 +08:00
parent a568ed98c7
commit f9d5b91b6c
3 changed files with 6 additions and 9 deletions

View File

@ -49,12 +49,14 @@ log:
How to send push notification using `gopush` command? (Android or iOS)
Download `gopush` binary file from [release page](https://github.com/appleboy/gopush/releases).
### Android
Send single notification with the following command.
```bash
$ ./gopush -android -m="your message" -k="API Key" -t="Device token"
$ gopush -android -m="your message" -k="API Key" -t="Device token"
```
* `-m`: Notification message.
@ -66,7 +68,7 @@ $ ./gopush -android -m="your message" -k="API Key" -t="Device token"
Send single notification with the following command.
```bash
$ ./gopush -ios -m="your message" -i="API Key" -t="Device token"
$ gopush -ios -m="your message" -i="API Key" -t="Device token"
```
* `-m`: Notification message.
@ -76,7 +78,7 @@ $ ./gopush -ios -m="your message" -i="API Key" -t="Device token"
The default endpoint is APNs development. Please add `-production` flag for APNs production push endpoint.
```bash
$ ./gopush -ios -m="your message" -i="API Key" -t="Device token" -production
$ gopush -ios -m="your message" -i="API Key" -t="Device token" -production
```
## License

View File

@ -35,7 +35,7 @@ func main() {
gopush.PushConf, err = gopush.LoadConfYaml(*confPath)
if err != nil {
log.Printf("Unable to load yaml config file: '%v'", err)
log.Printf("Load yaml config file error: '%v'", err)
return
}

View File

@ -3,7 +3,6 @@ package gopush
import (
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
)
type ConfYaml struct {
@ -89,16 +88,12 @@ func LoadConfYaml(confPath string) (ConfYaml, error) {
configFile, err := ioutil.ReadFile(confPath)
if err != nil {
log.Printf("Unable to read config file, path: '%s'", confPath)
return config, err
}
err = yaml.Unmarshal([]byte(configFile), &config)
if err != nil {
log.Printf("Unable to Unmarshal config file '%s'", confPath)
return config, err
}