make.go
1 package make 2 3 import ( 4 "github.com/spf13/cobra" 5 "github.com/thunderbrewhq/binana/go/app/cmd/root" 6 "github.com/thunderbrewhq/binana/go/app/profile" 7 ) 8 9 func mk_func(cmd *cobra.Command, args []string) { 10 compress, err := cmd.Flags().GetBool("compress") 11 if err != nil { 12 panic(err) 13 } 14 15 var params profile.MakeParams 16 params.Profile = args[0] 17 params.CompressX64dbgDatabase = compress 18 profile.Make(¶ms) 19 } 20 21 var mk_cmd = cobra.Command{ 22 Use: "mk profile", 23 Args: cobra.MinimumNArgs(1), 24 Short: "Convert source files into various tool formats", 25 Run: mk_func, 26 } 27 28 func init() { 29 f := mk_cmd.Flags() 30 f.BoolP("compress", "c", true, "enable/disable compression of the x64dbg database file") 31 root.RootCmd.AddCommand(&mk_cmd) 32 }