feat: 测试文件
This commit is contained in:

committed by
zhengkunwang223

parent
8a13ea9e45
commit
61823a86ba
21
backend/utils/nginx/nginx_test.go
Normal file
21
backend/utils/nginx/nginx_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package nginx
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNginx(t *testing.T) {
|
||||
//config, err := GetConfig("/opt/1Panel/data/apps/nginx/nginx-1/conf/conf.d/word-1.conf")
|
||||
config, err := GetConfig("/opt/1Panel/data/apps/nginx/nginx-new/conf/conf.d/1panel.cloud.conf")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
//server := config.FindServers()[0]
|
||||
//fmt.Println(server)
|
||||
//serverD := config.FindServers()[0]
|
||||
//serverD.AddListen("8989", false)
|
||||
|
||||
fmt.Println(DumpConfig(config, IndentedStyle))
|
||||
}
|
Reference in New Issue
Block a user