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–245 unchanged (245 lines)
246 })
247 })
248
249 w := PerformRequest(router, http.MethodGet, "/")
250
251 assert.Equal(t, http.StatusBadRequest, w.Code)
252 assert.Equal(t, strings.Replace("hola\n<map><foo>bar</foo></map>{\"foo\":\"bar\"}{\"foo\":\"bar\"}event:test\ndata:message\n\n", " ", "", -1), strings.Replace(w.Body.String(), " ", "", -1))
253}
254

After

…lines 1–245 unchanged (245 lines)
246 })
247 })
248
249 w := PerformRequest(router, http.MethodGet, "/")
250
251 assert.Equal(t, http.StatusBadRequest, w.Code)
252 assert.Equal(t, strings.ReplaceAll("hola\n<map><foo>bar</foo></map>{\"foo\":\"bar\"}{\"foo\":\"bar\"}event:test\ndata:message\n\n", " ", ""), strings.ReplaceAll(w.Body.String(), " ", ""))
253}
254

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 (+35 nodes collapsed)
function_declaration (+279 nodes collapsed)
function_declaration (+347 nodes collapsed)
function_declaration (+366 nodes collapsed)
function_declaration (+367 nodes collapsed)
function_declaration (+246 nodes collapsed)
function_declaration (+205 nodes collapsed)
comment "// TestMiddlewareFailHandlersChain - ensure that Fail interr"...
comment "// as well as Abort"
function_declaration (+206 nodes collapsed)
function_declaration
func "func"
identifier "TestMiddlewareWrite"
parameter_list
( "("
parameter_declaration
identifier "t"
pointer_type
* "*"
qualified_type
package_identifier "testing"
. "."
type_identifier "T"
) ")"
block
{ "{"
statement_list
short_var_declaration
expression_list
identifier "router"
:= ":="
expression_list
call_expression
identifier "New"
argument_list
( "("
) ")"
expression_statement (+42 nodes collapsed)
expression_statement (+54 nodes collapsed)
expression_statement (+54 nodes collapsed)
expression_statement (+116 nodes collapsed)
short_var_declaration (+21 nodes collapsed)
expression_statement
call_expression
selector_expression
identifier "assert"
. "."
field_identifier "Equal"
argument_list
( "("
identifier "t"
, ","
selector_expression
identifier "http"
. "."
field_identifier "StatusBadRequest"
, ","
selector_expression
identifier "w"
. "."
field_identifier "Code"
) ")"
expression_statement
call_expression
selector_expression
identifier "assert"
. "."
field_identifier "Equal"
argument_list
( "("
identifier "t"
, ","
call_expression
selector_expression
identifier "strings"
. "."
field_identifier "Replace"
argument_list
( "("
interpreted_string_literal (+26 nodes collapsed)
, ","
interpreted_string_literal
" "\""
interpreted_string_literal_content " "
" "\""
, ","
interpreted_string_literal
" "\""
" "\""
, ","
unary_expression
- "-"
int_literal "1"
) ")"
, ","
call_expression
selector_expression
identifier "strings"
. "."
field_identifier "Replace"
argument_list
( "("
call_expression
selector_expression
selector_expression
identifier "w"
. "."
field_identifier "Body"
. "."
field_identifier "String"
argument_list
( "("
) ")"
, ","
interpreted_string_literal
" "\""
interpreted_string_literal_content " "
" "\""
, ","
interpreted_string_literal
" "\""
" "\""
, ","
unary_expression
- "-"
int_literal "1"
) ")"
) ")"
} "}"

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 (+35 nodes collapsed)
function_declaration (+279 nodes collapsed)
function_declaration (+347 nodes collapsed)
function_declaration (+366 nodes collapsed)
function_declaration (+367 nodes collapsed)
function_declaration (+246 nodes collapsed)
function_declaration (+205 nodes collapsed)
comment "// TestMiddlewareFailHandlersChain - ensure that Fail interr"...
comment "// as well as Abort"
function_declaration (+206 nodes collapsed)
function_declaration
func "func"
identifier "TestMiddlewareWrite"
parameter_list
( "("
parameter_declaration
identifier "t"
pointer_type
* "*"
qualified_type
package_identifier "testing"
. "."
type_identifier "T"
) ")"
block
{ "{"
statement_list
short_var_declaration
expression_list
identifier "router"
:= ":="
expression_list
call_expression
identifier "New"
argument_list
( "("
) ")"
expression_statement (+42 nodes collapsed)
expression_statement (+54 nodes collapsed)
expression_statement (+54 nodes collapsed)
expression_statement (+116 nodes collapsed)
short_var_declaration (+21 nodes collapsed)
expression_statement
call_expression
selector_expression
identifier "assert"
. "."
field_identifier "Equal"
argument_list
( "("
identifier "t"
, ","
selector_expression
identifier "http"
. "."
field_identifier "StatusBadRequest"
, ","
selector_expression
identifier "w"
. "."
field_identifier "Code"
) ")"
expression_statement
call_expression
selector_expression
identifier "assert"
. "."
field_identifier "Equal"
argument_list
( "("
identifier "t"
, ","
call_expression
selector_expression
identifier "strings"
. "."
field_identifier "ReplaceAll"
argument_list
( "("
interpreted_string_literal (+26 nodes collapsed)
, ","
interpreted_string_literal
" "\""
interpreted_string_literal_content " "
" "\""
, ","
interpreted_string_literal
" "\""
" "\""
) ")"
, ","
call_expression
selector_expression
identifier "strings"
. "."
field_identifier "ReplaceAll"
argument_list
( "("
call_expression
selector_expression
selector_expression
identifier "w"
. "."
field_identifier "Body"
. "."
field_identifier "String"
argument_list
( "("
) ")"
, ","
interpreted_string_literal
" "\""
interpreted_string_literal_content " "
" "\""
, ","
interpreted_string_literal
" "\""
" "\""
) ")"
) ")"
} "}"