mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 15:52:27 +08:00
大量优化
This commit is contained in:
@@ -13,11 +13,14 @@ func TestClientProtoGen(t *testing.T) {
|
||||
}
|
||||
nameList := make([]string, 0)
|
||||
for _, entry := range dir {
|
||||
split := strings.Split(entry.Name(), ".")
|
||||
if len(split) != 2 || split[1] != "proto" {
|
||||
if entry.IsDir() {
|
||||
continue
|
||||
}
|
||||
nameList = append(nameList, split[0])
|
||||
split := strings.Split(entry.Name(), ".")
|
||||
if len(split) < 2 || split[len(split)-1] != "proto" {
|
||||
continue
|
||||
}
|
||||
nameList = append(nameList, split[len(split)-2])
|
||||
}
|
||||
|
||||
fileData := "package client_proto\n"
|
||||
|
||||
Reference in New Issue
Block a user