diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-07-20 21:16:15 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-07-20 21:16:15 +0100 |
commit | ebc5ed4a760a51772b1e6255dd0c7dd7a641c2bb (patch) | |
tree | 0274f857f525de6d6769df6a7aa7eb5232a2f785 /cmd/main.go | |
parent | 9f5398b1aa338404403c8de4f48d343a90fe2428 (diff) |
cleaned up comments with old code
Diffstat (limited to '')
-rw-r--r-- | cmd/main.go | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/cmd/main.go b/cmd/main.go index 1f6e4ab..da801b7 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -49,16 +49,6 @@ func setUp() (string, error) { return dir, nil } -// from datamaps-c - -// { 0,0,0,0, "Datamap options: (when calling 'datamaps datamap')." }, -// {"import", DM_IMPORT, "PATH", 0, "PATH to datamap file to import."}, -// {"name", DM_NAME, "NAME", 0, "The name you want to give to the imported datamap."}, -// {"overwrite", DM_OVERWRITE, 0, 0, "Start fresh with this datamap (erases existing datamap data)."}, -// {"initial", DM_INITIAL, 0, 0, "This option must be used where no datamap table yet exists."}, - -// Checkout https://gobyexample.com/command-line-subcommands - func main() { // setup command setupCmd := flag.NewFlagSet("setup", flag.ExitOnError) @@ -118,73 +108,3 @@ func main() { os.Exit(1) } } - -// var setup bool - -// // Example for go docs about how to set up short and long flags. -// const setupUsage = "Initialise configuration and database files" - -// flag.BoolVar(&setup, "setup", false, setupUsage) -// flag.BoolVar(&setup, "s", false, setupUsage) -// flag.Parse() -// if setup == true { -// _, err := setUp() -// if err != nil { -// log.Fatal(err) -// } -// } else { -// fmt.Println("No command given.") -// flag.PrintDefaults() -// } - -// func main() { -// app := &cli.App{ -// Flags: []cli.Flag{ -// &cli.StringFlag{ -// Name: "datamap, dm", -// Aliases: []string{"dm"}, -// Value: "/home/lemon/Documents/datamaps/input/datamap.csv", -// Usage: "Path to a datamap file", -// }, -// &cli.StringFlag{ -// Name: "master, m", -// Aliases: []string{"m"}, -// Value: "/home/lemon/Documents/datamaps/input/master.xlsx", -// Usage: "Path to a master file", -// }, -// }, -// Commands: []*cli.Command{ -// { -// Name: "import", -// Aliases: []string{"i"}, -// Usage: "Import a bunch of populated templates", -// Action: func(c *cli.Context) error { -// return nil -// }, -// }, -// { -// Name: "export", -// Aliases: []string{"e"}, -// Usage: "Export a master to populate blank templates", -// Action: func(c *cli.Context) error { -// return nil -// }, -// }, -// }, -// Name: "datamaps", -// Usage: "Import and export data to and from spreadsheets", -// Action: func(c *cli.Context) error { -// fmt.Println("DATAMAPS") -// return nil -// }, -// } - -// err := app.Run(os.Args) -// if err != nil { -// log.Fatal(err) -// } -// _, err = setUp() -// if err != nil { -// log.Fatal(err) -// } -// } |