embed frontend

This commit is contained in:
0xJacky 2022-02-18 00:01:27 +08:00
parent 882fe8c074
commit d09f484790
86 changed files with 884 additions and 12326 deletions

20
test/nginx_test.go Normal file
View file

@ -0,0 +1,20 @@
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])
}