Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RunCmd = &cobra.Command{ Use: "config", Short: "Viewing and modifying local configurations", Run: func(cmd *cobra.Command, args []string) { configPath := localConfigFilePath(WorkSpace) fmt.Printf("Workspace Config: %s\n\n", configPath) raw, err := os.ReadFile(configPath) if err != nil { fmt.Printf("read config failed: %s\n", err.Error()) fmt.Println("Generate local configuration with 'nanafs config init'") return } cfg := config.Config{} if err := json.Unmarshal(raw, &cfg); err != nil { fmt.Printf("load config failed: %s\n", err.Error()) return } raw, err = json.MarshalIndent(cfg, "", " ") if err != nil { fmt.Printf("marshal config failed: %s\n", err.Error()) return } fmt.Println(string(raw)) }, }
View Source
var WorkSpace string
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.