diff --git a/README.md b/README.md index 98d53b5..5414fcb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/gorush.go b/gorush.go index e88d93f..2fc3981 100644 --- a/gorush.go +++ b/gorush.go @@ -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 } diff --git a/gorush/config.go b/gorush/config.go index 67c6e92..bb0af4e 100644 --- a/gorush/config.go +++ b/gorush/config.go @@ -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 }