mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
change work dir
This commit is contained in:
parent
ce850f5e59
commit
08b54b5bbb
31 changed files with 260 additions and 259 deletions
|
@ -1,20 +0,0 @@
|
|||
package test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGetNginx(t *testing.T) {
|
||||
out, err := exec.Command("nginx", "-V").CombinedOutput()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Printf("%s\n", out)
|
||||
|
||||
r, _ := regexp.Compile("--conf-path=(.*)/(.*.conf)")
|
||||
fmt.Println(r.FindStringSubmatch(string(out))[1])
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue