Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "readme [url]", Short: "View github readme files from the terminal", Long: `Parse and view github readme files in the terminal without having to go to a browser url should be in the form of username/repository on github`, Run: func(cmd *cobra.Command, args []string) { switch { case len(args) != 1: cmd.Help() case !strings.Contains(args[0], "/"): cmd.Help() default: Readme(args) } }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
func EnableColors ¶
func EnableColors()
EnableColors causes the colors to be enabled by default. The color library usually tests to see if the stdout is a terminal first and disables them if not. With colors always enabled, the user can pipe to `less -R` and still get color output
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func PrintInlineCode ¶
func PrintInlineCode(s string)
PrintInlineCode prints when there is code in between backticks (`code`)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.