Documentation ¶
Index ¶
- Variables
- func DeleteCSVItem(username string, id int) (err error)
- func DoesProductExist(product ProductListing) bool
- func FindCmd(command []string) (fullpath string, err error)
- func GetCSVCategory(username string, category string, args ...string) (err error)
- func GetCSVItem(username string, id int) (err error)
- func GetCSVTopCategory(username string) (err error)
- func IsUsernameExist(username string) bool
- func LastProductId() int
- func ReGenerateCSVProduct(lines [][]string) error
- func ReadCSVProduct() [][]string
- func SetPrompt(arg ...string) string
- func UpdateCSVItem(username string, id int, args []string) (err error)
- func WriteCSVProduct(product ProductListing) error
- func WriteCSVUser(username string) error
- type ProductListing
- type Prompt
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DeleteCSVItem ¶
DeleteCSVItem - Remove an item from csv item file
func DoesProductExist ¶
func DoesProductExist(product ProductListing) bool
DoesProductExist - Verify if a product exist
func GetCSVCategory ¶
GetCSVCategory - Show items from a follow category
func GetCSVItem ¶
GetCSVItem - Find and return an item from csv item file
func GetCSVTopCategory ¶
GetCSVTopCategory - Show the top category with most items
func IsUsernameExist ¶
IsUsernameExist - Check if user exist
func ReGenerateCSVProduct ¶
ReGenerateCSVProduct - Regenerates the csv item file
for delete/update operations
func ReadCSVProduct ¶
func ReadCSVProduct() [][]string
ReadCSVProduct - Read all items from a csv item file
func UpdateCSVItem ¶
UpdateCSVItem - Find and update an item from csv item file
func WriteCSVProduct ¶
func WriteCSVProduct(product ProductListing) error
WriteCSVProduct - Writes the item into the csv file
func WriteCSVUser ¶
WriteCSVUser - Write username into csv user file
Types ¶
Click to show internal directories.
Click to hide internal directories.