summaryrefslogtreecommitdiffstats
path: root/cmd/platform/mattermost.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-04-15 13:45:22 -0400
committerChristopher Speller <crspeller@gmail.com>2017-04-15 13:45:22 -0400
commit461a0b3b7c14cd59cb53eb66f419c965ab3bdd24 (patch)
tree88eea69d8963214fa43e8bf1a9989f2ab3d1c521 /cmd/platform/mattermost.go
parent24667e3e5423dc939770d0b4bf06ed2f42b4a445 (diff)
downloadchat-461a0b3b7c14cd59cb53eb66f419c965ab3bdd24.tar.gz
chat-461a0b3b7c14cd59cb53eb66f419c965ab3bdd24.tar.bz2
chat-461a0b3b7c14cd59cb53eb66f419c965ab3bdd24.zip
PLT-6113 Added initial unit tests for cmd package (#6086)
* Fixed app.CreateUser not using the provided locale * Added initial unit tests for cmd package * Disabled unit tests while we move to 'go build'
Diffstat (limited to 'cmd/platform/mattermost.go')
-rw-r--r--cmd/platform/mattermost.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/cmd/platform/mattermost.go b/cmd/platform/mattermost.go
index 9985a6887..56e91dd8d 100644
--- a/cmd/platform/mattermost.go
+++ b/cmd/platform/mattermost.go
@@ -23,21 +23,24 @@ import (
//ENTERPRISE_IMPORTS
func main() {
- var rootCmd = &cobra.Command{
- Use: "platform",
- Short: "Open source, self-hosted Slack-alternative",
- Long: `Mattermost offers workplace messaging across web, PC and phones with archiving, search and integration with your existing systems. Documentation available at https://docs.mattermost.com`,
- RunE: runServerCmd,
+ if err := rootCmd.Execute(); err != nil {
+ os.Exit(1)
}
+}
+
+func init() {
rootCmd.PersistentFlags().StringP("config", "c", "config.json", "Configuration file to use.")
resetCmd.Flags().Bool("confirm", false, "Confirm you really want to delete everything and a DB backup has been performed.")
rootCmd.AddCommand(serverCmd, versionCmd, userCmd, teamCmd, licenseCmd, importCmd, resetCmd, channelCmd, rolesCmd, testCmd, ldapCmd)
+}
- if err := rootCmd.Execute(); err != nil {
- os.Exit(1)
- }
+var rootCmd = &cobra.Command{
+ Use: "platform",
+ Short: "Open source, self-hosted Slack-alternative",
+ Long: `Mattermost offers workplace messaging across web, PC and phones with archiving, search and integration with your existing systems. Documentation available at https://docs.mattermost.com`,
+ RunE: runServerCmd,
}
var resetCmd = &cobra.Command{