Skip to content

Commit

Permalink
feat: <go> remove unused double quote
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Feb 12, 2020
1 parent 7c89843 commit 0b49fca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class GoFullIdentListener(var fileName: String) : GoAstListener() {
}

override fun enterImportSpec(ctx: GoParser.ImportSpecContext?) {
val sourceName = ctx!!.importPath().text
val originSource = ctx!!.importPath().text
val sourceName = originSource.replace("\"", "")
val codeImport = CodeImport(Source = sourceName)

if (ctx.DOT() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ import "fmt"

val codeFile = GoAnalyser().analysis(code, "")
assertEquals(codeFile.Imports.size, 1)
assertEquals(codeFile.Imports[0].Source, "\"fmt\"")
assertEquals(codeFile.Imports[0].Source, "fmt")
}
}

0 comments on commit 0b49fca

Please # to comment.