Skip to content

Commit 41b535e

Browse files
iporsutWeerasak Chongnguluam
and
Weerasak Chongnguluam
authored
chore: change empty interface to using any predefine type (#629)
Co-authored-by: Weerasak Chongnguluam <weerasak.cho@cjexpress.co.th>
1 parent a61f96a commit 41b535e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

_tools/customlint/emptycase.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var emptyCaseAnalyzer = &analysis.Analyzer{
1919
},
2020
}
2121

22-
func runEmptyCase(pass *analysis.Pass) (interface{}, error) {
22+
func runEmptyCase(pass *analysis.Pass) (any, error) {
2323
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
2424

2525
nodeFilter := []ast.Node{

internal/project/service.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ func (s *Service) loadConfiguredProject(project *Project) {
540540

541541
s.logf("Config: %s : %s",
542542
project.configFileName,
543-
core.Must(core.StringifyJson(map[string]interface{}{
543+
core.Must(core.StringifyJson(map[string]any{
544544
"rootNames": parsedCommandLine.FileNames(),
545545
"options": parsedCommandLine.CompilerOptions(),
546546
"projectReferences": parsedCommandLine.ProjectReferences(),
@@ -608,6 +608,6 @@ func (s *Service) log(msg string) {
608608
s.options.Logger.Info(msg)
609609
}
610610

611-
func (s *Service) logf(format string, args ...interface{}) {
611+
func (s *Service) logf(format string, args ...any) {
612612
s.log(fmt.Sprintf(format, args...))
613613
}

internal/testutil/testutil.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"gotest.tools/v3/assert"
1212
)
1313

14-
func AssertPanics(tb testing.TB, fn func(), expected any, msgAndArgs ...interface{}) {
14+
func AssertPanics(tb testing.TB, fn func(), expected any, msgAndArgs ...any) {
1515
tb.Helper()
1616

1717
var got any

0 commit comments

Comments
 (0)