28 lines
477 B
Go
28 lines
477 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var rootCmd = &cobra.Command{
|
|
Use: "maplefile-backend",
|
|
Short: "MapleFile Backend Server",
|
|
Long: `MapleFile - Standalone encrypted file storage backend server.`,
|
|
}
|
|
|
|
func Execute() {
|
|
if err := rootCmd.Execute(); err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
func init() {
|
|
// Add subcommands
|
|
rootCmd.AddCommand(daemonCmd)
|
|
rootCmd.AddCommand(migrateCmd)
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|