1
0
mirror of https://github.com/golang/go synced 2024-11-05 23:36:12 -07:00
go/refactor/eg/testdata/I1.golden
Colin 2226533658 refactor/eg: Add support for multi line after statements to eg.
The semantics of this change are that the last line will be subsituted
in place of the expression, where as the lines before that will undergo
variable substitution and be prepended before the lowest (in the AST
tree sense) statement which included the expression.

Change-Id: Ie2571934dcc1b0a30b5cec157e690924a4ac2c5a
Reviewed-on: https://go-review.googlesource.com/77730
Reviewed-by: Alan Donovan <adonovan@google.com>
2018-03-19 17:51:41 +00:00

15 lines
137 B
Plaintext

// +build ignore
package I1
import (
"errors"
"fmt"
)
func example() {
n := fmt.Sprintf("error - %s", "foo")
_ = errors.New(n)
}