|
@@ -23,7 +23,7 @@ func Test_GetSourceProto(t *testing.T) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
- var testData = []test{
|
|
|
|
|
|
+ testData := []test{
|
|
{
|
|
{
|
|
source: []string{"a.proto"},
|
|
source: []string{"a.proto"},
|
|
expected: filepath.Join(pwd, "a.proto"),
|
|
expected: filepath.Join(pwd, "a.proto"),
|
|
@@ -54,7 +54,7 @@ func Test_GetSourceProto(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func Test_RemoveGoctlFlag(t *testing.T) {
|
|
func Test_RemoveGoctlFlag(t *testing.T) {
|
|
- var testData = []test{
|
|
|
|
|
|
+ testData := []test{
|
|
{
|
|
{
|
|
source: strings.Fields("protoc foo.proto --go_out=. --go_opt=bar --zrpc_out=. --style go-zero --home=foo"),
|
|
source: strings.Fields("protoc foo.proto --go_out=. --go_opt=bar --zrpc_out=. --style go-zero --home=foo"),
|
|
expected: "protoc foo.proto --go_out=. --go_opt=bar",
|
|
expected: "protoc foo.proto --go_out=. --go_opt=bar",
|
|
@@ -87,7 +87,7 @@ func Test_RemoveGoctlFlag(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
func Test_RemovePluginFlag(t *testing.T) {
|
|
func Test_RemovePluginFlag(t *testing.T) {
|
|
- var testData = []test{
|
|
|
|
|
|
+ testData := []test{
|
|
{
|
|
{
|
|
source: strings.Fields("plugins=grpc:."),
|
|
source: strings.Fields("plugins=grpc:."),
|
|
expected: ".",
|
|
expected: ".",
|