github.com/coincircle/mattermost-server@v4.8.1-0.20180321182714-9d701c704416+incompatible/cmd/cmd.go (about)

     1  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
     2  // See License.txt for license information.
     3  
     4  package cmd
     5  
     6  import (
     7  	"github.com/spf13/cobra"
     8  )
     9  
    10  type Command = cobra.Command
    11  
    12  func Run(args []string) error {
    13  	RootCmd.SetArgs(args)
    14  	return RootCmd.Execute()
    15  }
    16  
    17  var RootCmd = &cobra.Command{
    18  	Use:   "platform",
    19  	Short: "Open source, self-hosted Slack-alternative",
    20  	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`,
    21  }
    22  
    23  func init() {
    24  	RootCmd.PersistentFlags().StringP("config", "c", "config.json", "Configuration file to use.")
    25  	RootCmd.PersistentFlags().Bool("disableconfigwatch", false, "When set config.json will not be loaded from disk when the file is changed.")
    26  }