mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-14 17:59:57 +07:00
docs: add notes for cmd
This commit is contained in:
@ -17,7 +17,8 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
reloadCmd = &cobra.Command{
|
reloadCmd = &cobra.Command{
|
||||||
Use: "reload [pid]",
|
Use: "reload [pid]",
|
||||||
|
Short: "To reload config file without interrupt connections.",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
internal.AutoSu()
|
internal.AutoSu()
|
||||||
if len(args) == 0 {
|
if len(args) == 0 {
|
||||||
@ -44,4 +45,4 @@ var (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(reloadCmd)
|
rootCmd.AddCommand(reloadCmd)
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ var (
|
|||||||
|
|
||||||
runCmd = &cobra.Command{
|
runCmd = &cobra.Command{
|
||||||
Use: "run",
|
Use: "run",
|
||||||
Short: "Run dae in the foreground",
|
Short: "To run dae in the foreground.",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
if cfgFile == "" {
|
if cfgFile == "" {
|
||||||
logrus.Fatalln("Argument \"--config\" or \"-c\" is required but not provided.")
|
logrus.Fatalln("Argument \"--config\" or \"-c\" is required but not provided.")
|
||||||
|
@ -17,7 +17,8 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
suspendCmd = &cobra.Command{
|
suspendCmd = &cobra.Command{
|
||||||
Use: "suspend [pid]",
|
Use: "suspend [pid]",
|
||||||
|
Short: "To suspend dae. This command puts dae into no-load state. Recover it by 'dae reload'.",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
internal.AutoSu()
|
internal.AutoSu()
|
||||||
if len(args) == 0 {
|
if len(args) == 0 {
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
var (
|
var (
|
||||||
validateCmd = &cobra.Command{
|
validateCmd = &cobra.Command{
|
||||||
Use: "validate",
|
Use: "validate",
|
||||||
Short: "Validate dae config",
|
Short: "To validating dae config.",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
if cfgFile == "" {
|
if cfgFile == "" {
|
||||||
fmt.Println("Argument \"--config\" or \"-c\" is required but not provided.")
|
fmt.Println("Argument \"--config\" or \"-c\" is required but not provided.")
|
||||||
|
Reference in New Issue
Block a user