github.com/jenkins-x/jx/v2@v2.1.155/pkg/cmd/docs.go (about) 1 package cmd 2 3 import ( 4 "github.com/jenkins-x/jx/v2/pkg/cmd/helper" 5 "github.com/jenkins-x/jx/v2/pkg/cmd/opts" 6 "github.com/spf13/cobra" 7 8 "github.com/pkg/browser" 9 ) 10 11 const ( 12 docsURL = "https://jenkins-x.io/documentation/" 13 ) 14 15 /* open the docs - Jenkins X docs by default */ 16 func NewCmdDocs(commonOpts *opts.CommonOptions) *cobra.Command { 17 cmd := &cobra.Command{ 18 Use: "docs", 19 Short: "Open the documentation in a browser", 20 Run: func(cmd *cobra.Command, args []string) { 21 err := browser.OpenURL(docsURL) 22 helper.CheckErr(err) 23 }, 24 } 25 return cmd 26 }