diff --git a/README.md b/README.md index 847a72d..320e9cd 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ Flags: -c, --content-format int Content format (default 50) -h, --help help for coap-cli -H, --host string Host (default "localhost") - -k, --keep-alive uint Keep alive interval (default 60) + -k, --keep-alive uint Send a ping after interval seconds of inactivity. If not specified (or 0), keep-alive is disabled (default). -m, --max-retries uint32 Max retries for keep alive (default 10) - -O, --options stringArray Options + -O, --options num,text Add option num with contents of text to the request. If the text begins with 0x, then the hex text (two [0-9a-f] per byte) is converted to binary data. -p, --port string Port (default "5683") -v, --verbose Verbose output -d, --data string Data(default "") - only available for put, post and delete commands diff --git a/cmd/main.go b/cmd/main.go index 136a5cd..c184ee4 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -83,8 +83,8 @@ func main() { rootCmd.PersistentFlags().StringVarP(&port, "port", "p", "5683", "Port") rootCmd.PersistentFlags().StringVarP(&auth, "auth", "a", "", "Auth") rootCmd.PersistentFlags().IntVarP(&contentFormat, "content-format", "c", 50, "Content format") - rootCmd.PersistentFlags().StringArrayVarP(&options, "options", "O", []string{}, "Options") - rootCmd.PersistentFlags().Uint64VarP(&keepAlive, "keep-alive", "k", 60, "Keep alive interval") + rootCmd.PersistentFlags().StringArrayVarP(&options, "options", "O", []string{}, "Add option num with contents of text to the request. If the text begins with 0x, then the hex text (two [0-9a-f] per byte) is converted to binary data.") + rootCmd.PersistentFlags().Uint64VarP(&keepAlive, "keep-alive", "k", 0, "Send a ping after interval seconds of inactivity. If not specified (or 0), keep-alive is disabled (default).") rootCmd.PersistentFlags().Uint32VarP(&maxRetries, "max-retries", "m", 10, "Max retries for keep alive") rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Verbose output")