Documentation ¶
Index ¶
- func CheckTableExist() (bool, error)
- func CreateTable()
- func DeleteCommand(index int)
- func DisplaySelectedCommand(toolSearch string) *[]ToolsData
- func ExtractToolsList() []string
- func InsertCommand(tool string, gist string, toolCommand string)
- func OpenDatabaseConn(dbfile string) (*sql.DB, error)
- func Unique(intSlice []string) []string
- type PromptContent
- type ToolsData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTableExist ¶
CheckTableExist check if the table "helpcommnds" exist in the master database
func DeleteCommand ¶
func DeleteCommand(index int)
DeleteCommand deletes the row from the helpcommands table based on the row id provided
func DisplaySelectedCommand ¶
DisplaySelectedCommand retuns slice to ToolsData based on search string
func ExtractToolsList ¶
func ExtractToolsList() []string
ExtractToolsList returns a slice containg the list of tools
func InsertCommand ¶
InsertNote inserts tool command with gist in the helpcommands table
func OpenDatabaseConn ¶
OpenDatabaseConn opens database connection and ping's the database and returns db connection
Types ¶
type PromptContent ¶
type ToolsData ¶
func DisplayAllNotes ¶
func DisplayAllNotes() []ToolsData
DisplayAllNotes prints all the rows in the helpcommands table
func SearchForTool ¶
DisplayCatNotes returns a slice of ToolsData after performing search based on the string provided
func SearchForToolLike ¶
DisplayCatNotes returns a slice of ToolsData after performing search based on the string provided