Unreviewed changes
10 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: go/analysis/passes/modernize/embedlit.go
Insertions: 1, Deletions: 16.
@@ -258,7 +258,7 @@
filename := tokFile.Name()
src, err := pass.ReadFile(filename)
if err != nil {
- return nil
+ return err
}
hasTrailingComma := false
@@ -404,18 +404,3 @@
}
return obj
}
-
-// type T struct {
-// A
-// }
-
-// type A struct {
-// longfieldname123849138499482938592359324 int
-// }
-
-// func _() {
-// v := T{
-// A: A{longfieldname123849138499482938592359324: 1}, //comment, with a comma
-// }
-
-// }
```
Change information
Commit message:
go/analysis/passes/modernize: additional pattern for embedlit
Modifies the embedlit modernizer to recognize an additional pattern:
t := T{...}
t.x = x
becomes
t := T{..., x:x}
Updates golang/go#77965
Change-Id: Ide5fee8d419cc5d6e8fb39c20cf552c3c72bf418
Files:
- M go/analysis/passes/modernize/embedlit.go
- M go/analysis/passes/modernize/testdata/src/embedlit/embedlit_go127.go
- M go/analysis/passes/modernize/testdata/src/embedlit/embedlit_go127.go.golden
Change size: L
Delta: 3 files changed, 480 insertions(+), 78 deletions(-)
Branch: refs/heads/master