Implements database connection with config data
This commit is contained in:
parent
0f54c090bb
commit
ad4bb08eb2
2 changed files with 44 additions and 18 deletions
19
cmd/add.go
19
cmd/add.go
|
|
@ -22,18 +22,23 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
type Feed struct {
|
||||
ID int
|
||||
URL string
|
||||
}
|
||||
|
||||
// addCmd represents the add command
|
||||
var addCmd = &cobra.Command{
|
||||
Use: "add",
|
||||
Short: "A brief description of your command",
|
||||
Long: `A longer description that spans multiple lines and likely contains examples
|
||||
and usage of using your command. For example:
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Short: "Adds a new feed to the application.",
|
||||
Long: `Validates and stores a feed in the application's database. Depending on the feed type, articles, videos, or updates are fetched right away.
|
||||
|
||||
Cobra is a CLI library for Go that empowers applications.
|
||||
This application is a tool to generate the needed files
|
||||
to quickly create a Cobra application.`,
|
||||
Supported types currently are:
|
||||
- RSS
|
||||
- Youtube Channel links`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("add called")
|
||||
fmt.Println("Not implemented. Feed will be added here")
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue