feature: file namestyle (#223)
* add api filename style * new feature: config.yaml * optimize * optimize logic generation * check hanlder valid * optimize * reactor naming style * optimize * optimize test * optimize gen middleware * format Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn> Co-authored-by: kim <xutao@xiaoheiban.cn>
This commit is contained in:
@@ -9,9 +9,14 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/core/stringx"
|
||||
conf "github.com/tal-tech/go-zero/tools/goctl/config"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/rpc/execx"
|
||||
)
|
||||
|
||||
var cfg = &conf.Config{
|
||||
NamingFormat: "gozero",
|
||||
}
|
||||
|
||||
func TestRpcGenerate(t *testing.T) {
|
||||
_ = Clean()
|
||||
dispatcher := NewDefaultGenerator()
|
||||
@@ -21,7 +26,7 @@ func TestRpcGenerate(t *testing.T) {
|
||||
return
|
||||
}
|
||||
projectName := stringx.Rand()
|
||||
g := NewRpcGenerator(dispatcher, namingLower)
|
||||
g := NewRpcGenerator(dispatcher, cfg)
|
||||
|
||||
// case go path
|
||||
src := filepath.Join(build.Default.GOPATH, "src")
|
||||
|
||||
Reference in New Issue
Block a user