mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-21 08:10:24 +08:00
feat: add wiki sub-command to open httprunner website
This commit is contained in:
12
hrp/internal/wiki/main.go
Normal file
12
hrp/internal/wiki/main.go
Normal 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()
|
||||
}
|
||||
3
hrp/internal/wiki/open_darwin.go
Normal file
3
hrp/internal/wiki/open_darwin.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package wiki
|
||||
|
||||
const openCmd = "open"
|
||||
3
hrp/internal/wiki/open_linux.go
Normal file
3
hrp/internal/wiki/open_linux.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package wiki
|
||||
|
||||
const openCmd = "xdg-open"
|
||||
3
hrp/internal/wiki/open_windows.go
Normal file
3
hrp/internal/wiki/open_windows.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package wiki
|
||||
|
||||
const openCmd = "explorer"
|
||||
Reference in New Issue
Block a user