Adding cobra root cli to application
							parent
							
								
									688c6083a5
								
							
						
					
					
						commit
						041965ad4f
					
				@ -1,5 +1,25 @@
 | 
				
			|||||||
# Flux Feed
 | 
					# Flux Feed
 | 
				
			||||||
 | 
					
 | 
				
			||||||

 | 
					
 | 
				
			||||||
 | 
					[](https://opensource.org/licenses/AGPL "License: AGPL")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
An Indie Reader for the modern day.
 | 
					An Indie Reader for the modern day.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Building
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					From the root of the source tree run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```shell
 | 
				
			||||||
 | 
					make build
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Using
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```shell
 | 
				
			||||||
 | 
					./fluxctl --help
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					is project is licensed under the MIT License. See the [LICENSE file](https://git.runcible.io/androiddrew/flux-feed/src/branch/main/LICENSE) for the full license text.
 | 
				
			||||||
@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					// Package cmd provides cli commands
 | 
				
			||||||
 | 
					package cmd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"fmt"
 | 
				
			||||||
 | 
						"os"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"github.com/spf13/cobra"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var rootCmd = &cobra.Command{
 | 
				
			||||||
 | 
						Use:   "fluxctl",
 | 
				
			||||||
 | 
						Short: "A flexible indie reader for the modern day",
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Execute executes the root command.
 | 
				
			||||||
 | 
					func Execute() {
 | 
				
			||||||
 | 
						if err := rootCmd.Execute(); err != nil {
 | 
				
			||||||
 | 
							fmt.Fprintln(os.Stderr, err)
 | 
				
			||||||
 | 
							os.Exit(1)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func init() {
 | 
				
			||||||
 | 
						rootCmd.AddCommand(MigrateCmd)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
					Loading…
					
					
				
		Reference in New Issue