feat: add wiki sub-command to open httprunner website

This commit is contained in:
debugtalk
2022-05-22 15:23:53 +08:00
parent 4863b96ec3
commit 63a2dff53b
7 changed files with 52 additions and 3 deletions

12
hrp/internal/wiki/main.go Normal file
View File

@@ -0,0 +1,12 @@
package wiki
import (
"os/exec"
"github.com/rs/zerolog/log"
)
func OpenWiki() error {
log.Info().Msgf("%s https://httprunner.com", openCmd)
return exec.Command(openCmd, "https://httprunner.com").Run()
}

View File

@@ -0,0 +1,3 @@
package wiki
const openCmd = "open"

View File

@@ -0,0 +1,3 @@
package wiki
const openCmd = "xdg-open"

View File

@@ -0,0 +1,3 @@
package wiki
const openCmd = "explorer"