fix: fix lint issue

上级 2a922bb3
......@@ -77,7 +77,7 @@ var gitCmd = &cobra.Command{
const secondsOfOneMonth = 2600640
month := time.Since(info.Age).Seconds() / secondsOfOneMonth
displayMonth := strconv.FormatFloat(month, 'f', 2, 64)
agesDisplay = append(agesDisplay, CodeAgeDisplay{info.EntityName, displayMonth})
agesDisplay = append(agesDisplay, CodeAgeDisplay{EntityName: info.EntityName, Month: displayMonth})
}
table.SetHeader([]string{"EntityName", "Month"})
......
......@@ -10,7 +10,7 @@ type CallGraph struct {
}
func NewCallGraph() CallGraph {
return *&CallGraph{}
return CallGraph{}
}
func (c CallGraph) Analysis(funcName string, clzs []domain.JClassNode) string {
......
......@@ -35,5 +35,5 @@ type EvaluateModel struct {
}
func NewEvaluateModel() EvaluateModel {
return *&EvaluateModel{Nullable: Nullable{Items: nil}}
return EvaluateModel{Nullable: Nullable{Items: nil}}
}
......@@ -35,7 +35,7 @@ type JFullIdentifier struct {
}
func NewJFullIdentifier() JFullIdentifier {
identifier := *&JFullIdentifier{"", "", ""}
identifier := JFullIdentifier{"", "", ""}
methods = nil
fields = make(map[string]JField)
imports = nil
......
......@@ -23,22 +23,18 @@ var currentPkg string
var identMap map[string]models.JIdentifier
var imports []string
var currentExtends = ""
var currentImplements = ""
var depInjectMap map[string]string
func NewJavaApiListener(jIdentMap map[string]models.JIdentifier, diMap map[string]string) *JavaApiListener {
isSpringRestController = false
currentClz = ""
currentPkg = ""
currentExtends = ""
currentImplements = ""
imports = nil
restApis = nil
identMap = jIdentMap
depInjectMap = diMap
params := make(map[string]string)
currentRestApi = models.RestApi{MethodParams: params}
......@@ -64,10 +60,6 @@ func (s *JavaApiListener) EnterClassDeclaration(ctx *parser.ClassDeclarationCont
currentClz = ctx.IDENTIFIER().GetText()
}
if ctx.EXTENDS() != nil {
currentExtends = ctx.TypeType().GetText()
}
if ctx.IMPLEMENTS() != nil {
currentImplements = ctx.TypeList().GetText()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册