2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 06:47:20 +08:00

feat: 初步实现nginx配置解析器

This commit is contained in:
耗子
2024-10-14 03:32:51 +08:00
parent a7a68f6b34
commit 1bea44146f
8 changed files with 745 additions and 2 deletions

26
pkg/nginx/parser_test.go Normal file
View File

@@ -0,0 +1,26 @@
package nginx
import (
"testing"
"github.com/stretchr/testify/suite"
)
type NginxTestSuite struct {
parser *Parser
suite.Suite
}
func TestNginxTestSuite(t *testing.T) {
parser, err := NewParser()
if err != nil {
t.Errorf("parse error %v", err)
}
suite.Run(t, &NginxTestSuite{
parser: parser,
})
}
func (suite *NginxTestSuite) TestA() {
suite.NoError(suite.parser.SetPHP(81))
}