Adam Ierymenko 5 年之前
父节点
当前提交
e3d47e588a

+ 18 - 0
go/cmd/zerotier/cli/addroot.go

@@ -0,0 +1,18 @@
+/*
+ * Copyright (c)2019 ZeroTier, Inc.
+ *
+ * Use of this software is governed by the Business Source License included
+ * in the LICENSE.TXT file in the project's root directory.
+ *
+ * Change Date: 2023-01-01
+ *
+ * On the date above, in accordance with the Business Source License, use
+ * of this software will be governed by version 2.0 of the Apache License.
+ */
+/****/
+
+package cli
+
+// AddRoot CLI command
+func AddRoot(args []string) {
+}

+ 18 - 0
go/cmd/zerotier/cli/join.go

@@ -0,0 +1,18 @@
+/*
+ * Copyright (c)2019 ZeroTier, Inc.
+ *
+ * Use of this software is governed by the Business Source License included
+ * in the LICENSE.TXT file in the project's root directory.
+ *
+ * Change Date: 2023-01-01
+ *
+ * On the date above, in accordance with the Business Source License, use
+ * of this software will be governed by version 2.0 of the Apache License.
+ */
+/****/
+
+package cli
+
+// Join CLI command
+func Join(args []string) {
+}

+ 18 - 0
go/cmd/zerotier/cli/leave.go

@@ -0,0 +1,18 @@
+/*
+ * Copyright (c)2019 ZeroTier, Inc.
+ *
+ * Use of this software is governed by the Business Source License included
+ * in the LICENSE.TXT file in the project's root directory.
+ *
+ * Change Date: 2023-01-01
+ *
+ * On the date above, in accordance with the Business Source License, use
+ * of this software will be governed by version 2.0 of the Apache License.
+ */
+/****/
+
+package cli
+
+// Leave CLI command
+func Leave(args []string) {
+}

+ 18 - 0
go/cmd/zerotier/cli/networks.go

@@ -0,0 +1,18 @@
+/*
+ * Copyright (c)2019 ZeroTier, Inc.
+ *
+ * Use of this software is governed by the Business Source License included
+ * in the LICENSE.TXT file in the project's root directory.
+ *
+ * Change Date: 2023-01-01
+ *
+ * On the date above, in accordance with the Business Source License, use
+ * of this software will be governed by version 2.0 of the Apache License.
+ */
+/****/
+
+package cli
+
+// Networks CLI command
+func Networks(args []string) {
+}

+ 18 - 0
go/cmd/zerotier/cli/peers.go

@@ -0,0 +1,18 @@
+/*
+ * Copyright (c)2019 ZeroTier, Inc.
+ *
+ * Use of this software is governed by the Business Source License included
+ * in the LICENSE.TXT file in the project's root directory.
+ *
+ * Change Date: 2023-01-01
+ *
+ * On the date above, in accordance with the Business Source License, use
+ * of this software will be governed by version 2.0 of the Apache License.
+ */
+/****/
+
+package cli
+
+// Peers CLI command
+func Peers(args []string) {
+}

+ 18 - 0
go/cmd/zerotier/cli/removeroot.go

@@ -0,0 +1,18 @@
+/*
+ * Copyright (c)2019 ZeroTier, Inc.
+ *
+ * Use of this software is governed by the Business Source License included
+ * in the LICENSE.TXT file in the project's root directory.
+ *
+ * Change Date: 2023-01-01
+ *
+ * On the date above, in accordance with the Business Source License, use
+ * of this software will be governed by version 2.0 of the Apache License.
+ */
+/****/
+
+package cli
+
+// RemoveRoot CLI command
+func RemoveRoot(args []string) {
+}

+ 18 - 0
go/cmd/zerotier/cli/roots.go

@@ -0,0 +1,18 @@
+/*
+ * Copyright (c)2019 ZeroTier, Inc.
+ *
+ * Use of this software is governed by the Business Source License included
+ * in the LICENSE.TXT file in the project's root directory.
+ *
+ * Change Date: 2023-01-01
+ *
+ * On the date above, in accordance with the Business Source License, use
+ * of this software will be governed by version 2.0 of the Apache License.
+ */
+/****/
+
+package cli
+
+// Roots CLI command
+func Roots(args []string) {
+}

+ 18 - 0
go/cmd/zerotier/cli/set.go

@@ -0,0 +1,18 @@
+/*
+ * Copyright (c)2019 ZeroTier, Inc.
+ *
+ * Use of this software is governed by the Business Source License included
+ * in the LICENSE.TXT file in the project's root directory.
+ *
+ * Change Date: 2023-01-01
+ *
+ * On the date above, in accordance with the Business Source License, use
+ * of this software will be governed by version 2.0 of the Apache License.
+ */
+/****/
+
+package cli
+
+// Set CLI command
+func Set(args []string) {
+}

+ 18 - 0
go/cmd/zerotier/cli/show.go

@@ -0,0 +1,18 @@
+/*
+ * Copyright (c)2019 ZeroTier, Inc.
+ *
+ * Use of this software is governed by the Business Source License included
+ * in the LICENSE.TXT file in the project's root directory.
+ *
+ * Change Date: 2023-01-01
+ *
+ * On the date above, in accordance with the Business Source License, use
+ * of this software will be governed by version 2.0 of the Apache License.
+ */
+/****/
+
+package cli
+
+// Show CLI command
+func Show(args []string) {
+}

+ 12 - 7
go/cmd/zerotier/zerotier.go

@@ -113,28 +113,33 @@ func main() {
 	case "help":
 		printHelp()
 		os.Exit(0)
-		return
-	default:
-		printHelp()
-		os.Exit(1)
-		return
-
 	case "version":
 		fmt.Printf("%d.%d.%d\n", zerotier.CoreVersionMajor, zerotier.CoreVersionMinor, zerotier.CoreVersionRevision)
 		os.Exit(0)
-
 	case "service":
 		cli.Service(cmdArgs)
 	case "status":
 		cli.Status(cmdArgs)
 	case "peers":
+		cli.Peers(cmdArgs)
 	case "roots":
+		cli.Roots(cmdArgs)
 	case "addroot":
+		cli.AddRoot(cmdArgs)
 	case "removeroot":
+		cli.RemoveRoot(cmdArgs)
 	case "networks":
+		cli.Networks(cmdArgs)
 	case "join":
+		cli.Join(cmdArgs)
 	case "leave":
+		cli.Leave(cmdArgs)
 	case "show":
+		cli.Show(cmdArgs)
 	case "set":
+		cli.Set(cmdArgs)
 	}
+
+	printHelp()
+	os.Exit(1)
 }