Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NixGenCmd = &cobra.Command{ Use: "nix-generate", Short: "generate resolves dependencies and generates the Nix files", Aliases: []string{"nix-gen"}, Long: `nix-generate resolves dependencies and generates the Nix files. `, Run: func(cmd *cobra.Command, args []string) { conf, err := configure.PreCheckConf() if err != nil { fmt.Println(styles.ErrorStyle.Render("error:", err.Error())) os.Exit(1) } if _, err := os.Stat("bsf.hcl"); err != nil { fmt.Println(styles.ErrorStyle.Render("error: ", err.Error()+"\nHas the project been initialized?")) fmt.Println(styles.HintStyle.Render("hint: ", "run `bsf init` to initialize the project")) os.Exit(1) } sc, err := search.NewClientWithAddr(conf.BuildSafeAPI, conf.BuildSafeAPITLS) if err != nil { fmt.Println(styles.ErrorStyle.Render("error: ", err.Error())) os.Exit(1) } m := model{sc: sc} m.resetSpinner() if _, err := tea.NewProgram(m).Run(); err != nil { os.Exit(1) } }, }
NixGenCmd represents the generate command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.