mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-18 21:38:57 +08:00
feat: 1pctl version 增加 mode 参数 (#784)
This commit is contained in:
parent
37806f1113
commit
05e7506f61
1 changed files with 8 additions and 0 deletions
|
|
@ -2,6 +2,9 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/1Panel-dev/1Panel/backend/configs"
|
||||||
|
"github.com/1Panel-dev/1Panel/cmd/server/conf"
|
||||||
|
"gopkg.in/yaml.v3"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
cmdUtils "github.com/1Panel-dev/1Panel/backend/utils/cmd"
|
cmdUtils "github.com/1Panel-dev/1Panel/backend/utils/cmd"
|
||||||
|
|
@ -39,6 +42,11 @@ var versionCmd = &cobra.Command{
|
||||||
|
|
||||||
fmt.Printf("1panel version: %s\n", version)
|
fmt.Printf("1panel version: %s\n", version)
|
||||||
fmt.Printf("appstore version: %s\n", appStoreVersion)
|
fmt.Printf("appstore version: %s\n", appStoreVersion)
|
||||||
|
config := configs.ServerConfig{}
|
||||||
|
if err := yaml.Unmarshal(conf.AppYaml, &config); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
fmt.Printf("mode: %s\n", config.System.Mode)
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue