Skip to content

Commit d9b2e3b

Browse files
committed
style: replace interface{} with any
1 parent f4f527a commit d9b2e3b

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

loggly.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"os"
88
"strings"
99

10-
search "github.com/Ajnasz/go-loggly-cli/search"
10+
"github.com/Ajnasz/go-loggly-cli/search"
1111
)
1212

1313
// Version is the version string
@@ -91,7 +91,7 @@ func check(err error) {
9191
}
9292
}
9393

94-
func printJSON(events []interface{}) error {
94+
func printJSON(events []any) error {
9595
for _, event := range events {
9696
data, err := json.Marshal(event)
9797
if err != nil {
@@ -104,12 +104,12 @@ func printJSON(events []interface{}) error {
104104
return nil
105105
}
106106

107-
func printLogMSG(events []interface{}) error {
108-
var ret []interface{}
107+
func printLogMSG(events []any) error {
108+
var ret []any
109109

110110
for i, event := range events {
111-
msg := event.(map[string]interface{})["logmsg"].(string)
112-
m := make(map[string]interface{})
111+
msg := event.(map[string]any)["logmsg"].(string)
112+
m := make(map[string]any)
113113
if err := json.Unmarshal([]byte(msg), &m); err != nil {
114114
return fmt.Errorf("Error at event %d: %w", i+1, err)
115115
}

search/search.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ func (q *Query) Fetch() (chan Response, chan error) {
237237
}
238238

239239
if res != nil {
240-
// resChan <- *res
241240
responsesStore.Store(page, *res)
242241

243242
if len(res.Events) < q.size {

0 commit comments

Comments
 (0)