From 6e65ba2a0bcff3149cf82e61d7fc1666c870d5ba Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Tue, 6 Aug 2019 16:03:48 +0200 Subject: [PATCH] fix naming from fluxxmpp to fluuxmpp --- cmd/{fluxxmpp => fluuxmpp}/README.md | 52 +++++++++++++------------- cmd/{fluxxmpp => fluuxmpp}/TODO.md | 0 cmd/{fluxxmpp => fluuxmpp}/check.go | 2 +- cmd/fluuxmpp/doc.go | 5 +++ cmd/{fluxxmpp => fluuxmpp}/log.go | 0 cmd/{fluxxmpp => fluuxmpp}/main.go | 4 +- cmd/{fluxxmpp => fluuxmpp}/send.go | 6 +-- cmd/{fluxxmpp => fluuxmpp}/xmppmuc.go | 0 cmd/{fluxxmpp => fluuxmpp}/xmppsend.go | 0 cmd/fluxxmpp/doc.go | 5 --- 10 files changed, 37 insertions(+), 37 deletions(-) rename cmd/{fluxxmpp => fluuxmpp}/README.md (78%) rename cmd/{fluxxmpp => fluuxmpp}/TODO.md (100%) rename cmd/{fluxxmpp => fluuxmpp}/check.go (93%) create mode 100644 cmd/fluuxmpp/doc.go rename cmd/{fluxxmpp => fluuxmpp}/log.go (100%) rename cmd/{fluxxmpp => fluuxmpp}/main.go (82%) rename cmd/{fluxxmpp => fluuxmpp}/send.go (95%) rename cmd/{fluxxmpp => fluuxmpp}/xmppmuc.go (100%) rename cmd/{fluxxmpp => fluuxmpp}/xmppsend.go (100%) delete mode 100644 cmd/fluxxmpp/doc.go diff --git a/cmd/fluxxmpp/README.md b/cmd/fluuxmpp/README.md similarity index 78% rename from cmd/fluxxmpp/README.md rename to cmd/fluuxmpp/README.md index 534d571..2366b63 100644 --- a/cmd/fluxxmpp/README.md +++ b/cmd/fluuxmpp/README.md @@ -1,23 +1,23 @@ -# fluxxmpp +# fluuxmpp -fluxxIO's xmpp comandline tool +fluuxIO's xmpp comandline tool ## Installation -To install `fluxxmpp` in your Go path: +To install `fluuxmpp` in your Go path: ``` -$ go get -u gosrc.io/xmpp/cmd/fluxxmpp +$ go get -u gosrc.io/xmpp/cmd/fluuxmpp ``` ## Usage ``` -$ fluxxmpp --help -fluxxIO's xmpp comandline tool +$ fluuxmpp --help +fluuxIO's xmpp comandline tool Usage: - fluxxmpp [command] + fluuxmpp [command] Available Commands: check is a command-line to check if you XMPP TLS certificate is valid and warn you before it expires @@ -25,22 +25,22 @@ Available Commands: send is a command-line tool to send to send XMPP messages to users Flags: - -h, --help help for fluxxmpp + -h, --help help for fluuxmpp -Use "fluxxmpp [command] --help" for more information about a command. +Use "fluuxmpp [command] --help" for more information about a command. ``` ### check tls ``` -$ fluxxmpp check --help +$ fluuxmpp check --help is a command-line to check if you XMPP TLS certificate is valid and warn you before it expires Usage: - fluxxmpp check [flags] + fluuxmpp check [flags] Examples: -fluxxmpp check chat.sum7.eu:5222 --domain meckerspace.de +fluuxmpp check chat.sum7.eu:5222 --domain meckerspace.de Flags: -d, --domain string domain if host handle multiple domains @@ -50,18 +50,18 @@ Flags: ### sending messages ``` -$ fluxxmpp send --help +$ fluuxmpp send --help is a command-line tool to send to send XMPP messages to users Usage: - fluxxmpp send [message] [flags] + fluuxmpp send [message] [flags] Examples: -fluxxmpp send to@chat.sum7.eu "Hello World!" +fluuxmpp send to@chat.sum7.eu "Hello World!" Flags: --addr string host[:port] - --config string config file (default is ~/.config/fluxxmpp.yml) + --config string config file (default is ~/.config/fluuxmpp.yml) -h, --help help for send --jid string using jid (required) -m, --muc recipient is a muc (join it before sending messages) @@ -76,7 +76,7 @@ Flags: If you server is on standard port and XMPP domains matches the hostname you can simply use: ``` -$ fluxxmpp check chat.sum7.eu +$ fluuxmpp check chat.sum7.eu info All checks passed ⇢ address="chat.sum7.eu" domain="" ⇢ main.go:43 main.runCheck @@ -86,7 +86,7 @@ $ fluxxmpp check chat.sum7.eu You can also pass the port and the XMPP domain if different from the server hostname: ``` -$ fluxxmpp check chat.sum7.eu:5222 --domain meckerspace.de +$ fluuxmpp check chat.sum7.eu:5222 --domain meckerspace.de info All checks passed ⇢ address="chat.sum7.eu:5222" domain="meckerspace.de" ⇢ main.go:43 main.runCheck @@ -101,7 +101,7 @@ monitoring scripts. Message from arguments: ```bash -$ fluxxmpp send to@example.org "Hello World!" +$ fluuxmpp send to@example.org "Hello World!" info client connected ⇢ cmd.go:56 main.glob..func1.1 ⇢ 2019-07-17T23:42:43.310+02:00 @@ -113,7 +113,7 @@ $ fluxxmpp send to@example.org "Hello World!" Message from STDIN: ```bash -$ journalctl -f | fluxxmpp send to@example.org - +$ journalctl -f | fluuxmpp send to@example.org - info client connected ⇢ cmd.go:56 main.glob..func1.1 ⇢ 2019-07-17T23:40:03.177+02:00 @@ -131,7 +131,7 @@ $ journalctl -f | fluxxmpp send to@example.org - Multiple recipients: ```bash -$ fluxxmpp send to1@example.org,to2@example.org "Multiple recipient" +$ fluuxmpp send to1@example.org,to2@example.org "Multiple recipient" info client connected ⇢ cmd.go:56 main.glob..func1.1 ⇢ 2019-07-17T23:47:57.650+02:00 @@ -147,7 +147,7 @@ $ fluxxmpp send to1@example.org,to2@example.org "Multiple recipient" Send to MUC: ```bash -journalctl -f | fluxxmpp send testit@conference.chat.sum7.eu - --muc +journalctl -f | fluuxmpp send testit@conference.chat.sum7.eu - --muc info client connected ⇢ cmd.go:56 main.glob..func1.1 ⇢ 2019-07-17T23:52:56.269+02:00 @@ -167,9 +167,9 @@ journalctl -f | fluxxmpp send testit@conference.chat.sum7.eu - --muc ### Configuration file In `/etc/`, `~/.config` and `.` (here). -You could create the file name `fluxxmpp` with you favorite file extenion (e.g. `toml`, `yml`). +You could create the file name `fluuxmpp` with you favorite file extenion (e.g. `toml`, `yml`). -e.g. ~/.config/fluxxmpp.toml +e.g. ~/.config/fluuxmpp.toml ```toml jid = "bot@example.org" password = "secret" @@ -185,7 +185,7 @@ export FLUXXMPP_PASSWORD='secret'; export FLUXXMPP_ADDR='example.com:5222'; -fluxxmpp send to@example.org "Hello Welt"; +fluuxmpp send to@example.org "Hello Welt"; ``` ### Parameters @@ -194,5 +194,5 @@ Warning: This should not be used for production systems, as all users on the sys can read the running processes, and their parameters (and thus the password). ```bash -fluxxmpp send to@example.org "Hello World!" --jid bot@example.org --password secret --addr example.com:5222; +fluuxmpp send to@example.org "Hello World!" --jid bot@example.org --password secret --addr example.com:5222; ``` diff --git a/cmd/fluxxmpp/TODO.md b/cmd/fluuxmpp/TODO.md similarity index 100% rename from cmd/fluxxmpp/TODO.md rename to cmd/fluuxmpp/TODO.md diff --git a/cmd/fluxxmpp/check.go b/cmd/fluuxmpp/check.go similarity index 93% rename from cmd/fluxxmpp/check.go rename to cmd/fluuxmpp/check.go index 9a27854..0ddfe3e 100644 --- a/cmd/fluxxmpp/check.go +++ b/cmd/fluuxmpp/check.go @@ -10,7 +10,7 @@ var domain = "" var cmdCheck = &cobra.Command{ Use: "check ", Short: "is a command-line to check if you XMPP TLS certificate is valid and warn you before it expires", - Example: "fluxxmpp check chat.sum7.eu:5222 --domain meckerspace.de", + Example: "fluuxmpp check chat.sum7.eu:5222 --domain meckerspace.de", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { runCheck(args[0], domain) diff --git a/cmd/fluuxmpp/doc.go b/cmd/fluuxmpp/doc.go new file mode 100644 index 0000000..d01e4da --- /dev/null +++ b/cmd/fluuxmpp/doc.go @@ -0,0 +1,5 @@ +/* + +fluuxmpp: fluuxIO's xmpp comandline tool +*/ +package main diff --git a/cmd/fluxxmpp/log.go b/cmd/fluuxmpp/log.go similarity index 100% rename from cmd/fluxxmpp/log.go rename to cmd/fluuxmpp/log.go diff --git a/cmd/fluxxmpp/main.go b/cmd/fluuxmpp/main.go similarity index 82% rename from cmd/fluxxmpp/main.go rename to cmd/fluuxmpp/main.go index ee073f6..176666d 100644 --- a/cmd/fluxxmpp/main.go +++ b/cmd/fluuxmpp/main.go @@ -7,8 +7,8 @@ import ( // cmdRoot represents the base command when called without any subcommands var cmdRoot = &cobra.Command{ - Use: "fluxxmpp", - Short: "fluxxIO's xmpp comandline tool", + Use: "fluuxmpp", + Short: "fluuxIO's xmpp comandline tool", } func main() { diff --git a/cmd/fluxxmpp/send.go b/cmd/fluuxmpp/send.go similarity index 95% rename from cmd/fluxxmpp/send.go rename to cmd/fluuxmpp/send.go index b730c05..ee01a27 100644 --- a/cmd/fluxxmpp/send.go +++ b/cmd/fluuxmpp/send.go @@ -21,7 +21,7 @@ var isMUCRecipient = false var cmdSend = &cobra.Command{ Use: "send [message]", Short: "is a command-line tool to send to send XMPP messages to users", - Example: `fluxxmpp send to@chat.sum7.eu "Hello World!"`, + Example: `fluuxmpp send to@chat.sum7.eu "Hello World!"`, Args: cobra.ExactArgs(2), Run: sendxmpp, } @@ -99,7 +99,7 @@ func init() { cmdRoot.AddCommand(cmdSend) cobra.OnInitialize(initConfigFile) - cmdSend.PersistentFlags().StringVar(&configFile, "config", "", "config file (default is ~/.config/fluxxmpp.yml)") + cmdSend.PersistentFlags().StringVar(&configFile, "config", "", "config file (default is ~/.config/fluuxmpp.yml)") cmdSend.Flags().StringP("jid", "", "", "using jid (required)") viper.BindPFlag("jid", cmdSend.Flags().Lookup("jid")) @@ -119,7 +119,7 @@ func initConfigFile() { viper.SetConfigFile(configFile) } - viper.SetConfigName("fluxxmpp") + viper.SetConfigName("fluuxmpp") viper.AddConfigPath("/etc/") viper.AddConfigPath("$HOME/.config") viper.AddConfigPath(".") diff --git a/cmd/fluxxmpp/xmppmuc.go b/cmd/fluuxmpp/xmppmuc.go similarity index 100% rename from cmd/fluxxmpp/xmppmuc.go rename to cmd/fluuxmpp/xmppmuc.go diff --git a/cmd/fluxxmpp/xmppsend.go b/cmd/fluuxmpp/xmppsend.go similarity index 100% rename from cmd/fluxxmpp/xmppsend.go rename to cmd/fluuxmpp/xmppsend.go diff --git a/cmd/fluxxmpp/doc.go b/cmd/fluxxmpp/doc.go deleted file mode 100644 index 80cf4a8..0000000 --- a/cmd/fluxxmpp/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -/* - -fluxxmpp: fluxxIO's xmpp comandline tool -*/ -package main