From 18916b5189e4c34f6cb8883ceac31c3d38493336 Mon Sep 17 00:00:00 2001 From: ronething-bot <47621124+ronething-bot@users.noreply.github.com> Date: Thu, 17 Mar 2022 10:00:29 +0800 Subject: [PATCH] [fix] typo (#1655) --- tools/goctl/api/parser/g4/ast/type.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/goctl/api/parser/g4/ast/type.go b/tools/goctl/api/parser/g4/ast/type.go index 0e55eaeb..91b66d3c 100644 --- a/tools/goctl/api/parser/g4/ast/type.go +++ b/tools/goctl/api/parser/g4/ast/type.go @@ -648,19 +648,19 @@ func (s *TypeStruct) Equal(dt interface{}) bool { return false } - var expected, acual []*TypeField + var expected, actual []*TypeField expected = append(expected, s.Fields...) - acual = append(acual, v.Fields...) + actual = append(actual, v.Fields...) sort.Slice(expected, func(i, j int) bool { return expected[i].DataType.Expr().Line() < expected[j].DataType.Expr().Line() }) - sort.Slice(acual, func(i, j int) bool { - return acual[i].DataType.Expr().Line() < acual[j].DataType.Expr().Line() + sort.Slice(actual, func(i, j int) bool { + return actual[i].DataType.Expr().Line() < actual[j].DataType.Expr().Line() }) for index, each := range expected { - ac := acual[index] + ac := actual[index] if !each.Equal(ac) { return false }