Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "read", Short: "Read SQLite file", Args: cobra.NoArgs, Run: func(c *cobra.Command, args []string) { db, err := sqlite_utils.OpenSQLite(FlagFile) if err != nil { fmt.Println(err) } tables := sqlite_utils.GetTables(db) if FlagTable == "" { for _, table := range tables { fmt.Println("Table: ", table) sqlite_utils.PrintTable(db, table) fmt.Println("") } } else { for _, table := range tables { if table == FlagTable { fmt.Println("Table: ", table) sqlite_utils.PrintTable(db, table) os.Exit(0) } } log.Fatal(fmt.Errorf("table %s not found", FlagTable)) } }, }
View Source
var FlagFile string
View Source
var FlagTable string
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.