-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from gostaticanalysis/release-v1.6.0
Release v1.6.0
- Loading branch information
Showing
9 changed files
with
237 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
@@ if eq .Type "codegen" -@@ | ||
// Code generated by @@.Pkg@@; DO NOT EDIT. | ||
package a | ||
|
||
type MockDB struct { | ||
GetFunc func(id string) int | ||
SetFunc func(id string, v int) | ||
} | ||
|
||
func (m *MockDB) Get(id string) int { | ||
return m.GetFunc(id) | ||
} | ||
|
||
func (m *MockDB) Set(id string, v int) { | ||
m.SetFunc(id, v) | ||
} | ||
|
||
type MockLogger struct { | ||
ErrorfFunc func(format string, args ...interface{}) | ||
InfofFunc func(format string, args ...interface{}) | ||
} | ||
|
||
func (m *MockLogger) Errorf(format string, args ...interface{}) { | ||
m.ErrorfFunc(format, args...) | ||
} | ||
|
||
func (m *MockLogger) Infof(format string, args ...interface{}) { | ||
m.InfofFunc(format, args...) | ||
} | ||
@@ end -@@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
@@ if (or (eq .Type "inspect") (eq .Type "ssa")) -@@ | ||
package a | ||
|
||
func f() { | ||
// The pattern can be written in regular expression. | ||
var gopher int // want "pattern" | ||
print(gopher) // want "identifier is gopher" | ||
} | ||
@@ end -@@ | ||
@@ if eq .Type "codegen" -@@ | ||
package a | ||
|
||
type DB interface { | ||
Get(id string) int | ||
Set(id string, v int) | ||
} | ||
|
||
type db struct{} | ||
|
||
func (db) Get(id string) int { return 0 } | ||
func (db) Set(id string, v int) {} | ||
|
||
type Logger interface { | ||
Infof(format string, args ...interface{}) | ||
Errorf(format string, args ...interface{}) | ||
} | ||
@@ end -@@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@@ if ne .Type "codegen" -@@ | ||
module a | ||
|
||
go 1.15 | ||
go @@.GoVer@@ | ||
@@ end -@@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.