diff --git a/spec/functional_test/testers/go_echo_spec.cr b/spec/functional_test/testers/go_echo_spec.cr index 984e3487..a7ec1bc1 100644 --- a/spec/functional_test/testers/go_echo_spec.cr +++ b/spec/functional_test/testers/go_echo_spec.cr @@ -3,13 +3,13 @@ require "../func_spec.cr" extected_endpoints = [ Endpoint.new("/", "GET"), Endpoint.new("/pet", "GET", [ - Param.new("query", "", "query") + Param.new("query", "", "query"), ]), Endpoint.new("/pet", "POST", [ - Param.new("name", "", "json") + Param.new("name", "", "json"), ]), Endpoint.new("/pet_form", "POST", [ - Param.new("name", "", "body") + Param.new("name", "", "body"), ]), Endpoint.new("/public/secret.html", "GET"), ] diff --git a/src/analyzer/analyzers/analyzer_go_echo.cr b/src/analyzer/analyzers/analyzer_go_echo.cr index f9ea351d..506183c2 100644 --- a/src/analyzer/analyzers/analyzer_go_echo.cr +++ b/src/analyzer/analyzers/analyzer_go_echo.cr @@ -20,7 +20,7 @@ class AnalyzerGoEcho < Analyzer end end - if line.includes?("Param(") || line.includes?("FormValue(") + if line.includes?("Param(") || line.includes?("FormValue(") get_param(line).tap do |param| if param.name.size > 0 && last_endpoint.method != "" last_endpoint.params << param @@ -41,7 +41,7 @@ class AnalyzerGoEcho < Analyzer end public_dirs.each do |p_dir| - full_path = (base_path + "/" + p_dir["file_path"]).gsub("//","/") + full_path = (base_path + "/" + p_dir["file_path"]).gsub("//", "/") Dir.glob("#{full_path}/**/*") do |path| next if File.directory?(path) if File.exists?(path)