Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–8 unchanged (8 lines)
9 "html/template"
10 "runtime"
11 "strconv"
12 "strings"
13)
14
15const ginSupportMinGoVer = 14
16
17// IsDebugging returns true if the framework is running in debug mode.
18// Use SetMode(gin.ReleaseMode) to disable debug mode.
19func IsDebugging() bool {
20 return ginMode == debugCode
21}
…lines 22–62 unchanged (41 lines)
63 return strconv.ParseUint(v[first+1:], 10, 64)
64 }
65 return strconv.ParseUint(v[first+1:last], 10, 64)
66}
67
68func debugPrintWARNINGDefault() {
69 if v, e := getMinVer(runtime.Version()); e == nil && v <= ginSupportMinGoVer {
70 debugPrint(`[WARNING] Now Gin requires Go 1.15+.
71
72`)
73 }
74 debugPrint(`[WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
75
…lines 76–102 unchanged (27 lines)

After

…lines 1–8 unchanged (8 lines)
9 "html/template"
10 "runtime"
11 "strconv"
12 "strings"
13)
14
15const ginSupportMinGoVer = 15
16
17// IsDebugging returns true if the framework is running in debug mode.
18// Use SetMode(gin.ReleaseMode) to disable debug mode.
19func IsDebugging() bool {
20 return ginMode == debugCode
21}
…lines 22–62 unchanged (41 lines)
63 return strconv.ParseUint(v[first+1:], 10, 64)
64 }
65 return strconv.ParseUint(v[first+1:last], 10, 64)
66}
67
68func debugPrintWARNINGDefault() {
69 if v, e := getMinVer(runtime.Version()); e == nil && v < ginSupportMinGoVer {
70 debugPrint(`[WARNING] Now Gin requires Go 1.15+.
71
72`)
73 }
74 debugPrint(`[WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
75
…lines 76–102 unchanged (27 lines)

Before

source_file
comment "// Copyright 2014 Manu Martinez-Almeida. All rights reserved"...
comment "// Use of this source code is governed by a MIT style"
comment "// license that can be found in the LICENSE file."
package_clause
package "package"
package_identifier "gin"
import_declaration (+30 nodes collapsed)
const_declaration
const "const"
const_spec
identifier "ginSupportMinGoVer"
= "="
expression_list
int_literal "14"
comment "// IsDebugging returns true if the framework is running in d"...
comment "// Use SetMode(gin.ReleaseMode) to disable debug mode."
function_declaration
func "func"
identifier "IsDebugging"
parameter_list
( "("
) ")"
type_identifier "bool"
block
{ "{"
statement_list
return_statement
return "return"
expression_list
binary_expression
identifier "ginMode"
== "=="
identifier "debugCode"
} "}"
comment "// DebugPrintRouteFunc indicates debug log output format."
var_declaration
var "var"
var_spec
identifier "DebugPrintRouteFunc"
function_type
func "func"
parameter_list
( "("
parameter_declaration
identifier "httpMethod"
, ","
identifier "absolutePath"
, ","
identifier "handlerName"
type_identifier "string"
, ","
parameter_declaration
identifier "nuHandlers"
type_identifier "int"
) ")"
function_declaration (+106 nodes collapsed)
function_declaration (+138 nodes collapsed)
function_declaration (+82 nodes collapsed)
function_declaration (+112 nodes collapsed)
function_declaration
func "func"
identifier "debugPrintWARNINGDefault"
parameter_list
( "("
) ")"
block
{ "{"
statement_list
if_statement
if "if"
short_var_declaration
expression_list
identifier "v"
, ","
identifier "e"
:= ":="
expression_list
call_expression
identifier "getMinVer"
argument_list
( "("
call_expression
selector_expression
identifier "runtime"
. "."
field_identifier "Version"
argument_list
( "("
) ")"
) ")"
; ";"
binary_expression
binary_expression
identifier "e"
== "=="
nil "nil"
&& "&&"
binary_expression
identifier "v"
<= "<="
identifier "ginSupportMinGoVer"
block
{ "{"
statement_list
expression_statement
call_expression
identifier "debugPrint"
argument_list
( "("
raw_string_literal
` "`"
raw_string_literal_content "[WARNING] Now Gin requires Go 1.15+.\n\n"
` "`"
) ")"
} "}"
expression_statement
call_expression
identifier "debugPrint"
argument_list
( "("
raw_string_literal
` "`"
raw_string_literal_content "[WARNING] Creating an Engine instance with the Logger and Re"...
` "`"
) ")"
} "}"
function_declaration
func "func"
identifier "debugPrintWARNINGNew"
parameter_list
( "("
) ")"
block
{ "{"
statement_list
expression_statement
call_expression
identifier "debugPrint"
argument_list
( "("
raw_string_literal
` "`"
raw_string_literal_content "[WARNING] Running in \"debug\" mode. Switch to \"release\" mode "...
` "`"
) ")"
} "}"
function_declaration
func "func"
identifier "debugPrintWARNINGSetHTMLTemplate"
parameter_list
( "("
) ")"
block
{ "{"
statement_list
expression_statement
call_expression
identifier "debugPrint"
argument_list
( "("
raw_string_literal
` "`"
raw_string_literal_content "[WARNING] Since SetHTMLTemplate() is NOT thread-safe. It sho"...
` "`"
) ")"
} "}"
function_declaration (+48 nodes collapsed)

After

source_file
comment "// Copyright 2014 Manu Martinez-Almeida. All rights reserved"...
comment "// Use of this source code is governed by a MIT style"
comment "// license that can be found in the LICENSE file."
package_clause
package "package"
package_identifier "gin"
import_declaration (+30 nodes collapsed)
const_declaration
const "const"
const_spec
identifier "ginSupportMinGoVer"
= "="
expression_list
int_literal "15"
comment "// IsDebugging returns true if the framework is running in d"...
comment "// Use SetMode(gin.ReleaseMode) to disable debug mode."
function_declaration
func "func"
identifier "IsDebugging"
parameter_list
( "("
) ")"
type_identifier "bool"
block
{ "{"
statement_list
return_statement
return "return"
expression_list
binary_expression
identifier "ginMode"
== "=="
identifier "debugCode"
} "}"
comment "// DebugPrintRouteFunc indicates debug log output format."
var_declaration
var "var"
var_spec
identifier "DebugPrintRouteFunc"
function_type
func "func"
parameter_list
( "("
parameter_declaration
identifier "httpMethod"
, ","
identifier "absolutePath"
, ","
identifier "handlerName"
type_identifier "string"
, ","
parameter_declaration
identifier "nuHandlers"
type_identifier "int"
) ")"
function_declaration (+106 nodes collapsed)
function_declaration (+138 nodes collapsed)
function_declaration (+82 nodes collapsed)
function_declaration (+112 nodes collapsed)
function_declaration
func "func"
identifier "debugPrintWARNINGDefault"
parameter_list
( "("
) ")"
block
{ "{"
statement_list
if_statement
if "if"
short_var_declaration
expression_list
identifier "v"
, ","
identifier "e"
:= ":="
expression_list
call_expression
identifier "getMinVer"
argument_list
( "("
call_expression
selector_expression
identifier "runtime"
. "."
field_identifier "Version"
argument_list
( "("
) ")"
) ")"
; ";"
binary_expression
binary_expression
identifier "e"
== "=="
nil "nil"
&& "&&"
binary_expression
identifier "v"
< "<"
identifier "ginSupportMinGoVer"
block
{ "{"
statement_list
expression_statement
call_expression
identifier "debugPrint"
argument_list
( "("
raw_string_literal
` "`"
raw_string_literal_content "[WARNING] Now Gin requires Go 1.15+.\n\n"
` "`"
) ")"
} "}"
expression_statement
call_expression
identifier "debugPrint"
argument_list
( "("
raw_string_literal
` "`"
raw_string_literal_content "[WARNING] Creating an Engine instance with the Logger and Re"...
` "`"
) ")"
} "}"
function_declaration
func "func"
identifier "debugPrintWARNINGNew"
parameter_list
( "("
) ")"
block
{ "{"
statement_list
expression_statement
call_expression
identifier "debugPrint"
argument_list
( "("
raw_string_literal
` "`"
raw_string_literal_content "[WARNING] Running in \"debug\" mode. Switch to \"release\" mode "...
` "`"
) ")"
} "}"
function_declaration
func "func"
identifier "debugPrintWARNINGSetHTMLTemplate"
parameter_list
( "("
) ")"
block
{ "{"
statement_list
expression_statement
call_expression
identifier "debugPrint"
argument_list
( "("
raw_string_literal
` "`"
raw_string_literal_content "[WARNING] Since SetHTMLTemplate() is NOT thread-safe. It sho"...
` "`"
) ")"
} "}"
function_declaration (+48 nodes collapsed)