Skip to content

Commit

Permalink
update: fix golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu327 committed Dec 26, 2023
1 parent 6a41811 commit cdee618
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ func main() {
api.Register(router)

// Run the server on port 8080
router.Run(fmt.Sprintf(":%d", *port))
err := router.Run(fmt.Sprintf(":%d", *port))
if err != nil {
panic(err)
}
}
4 changes: 2 additions & 2 deletions pkg/protocol/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ func encode(writer io.Writer, event Event) error {
}

func writeData(w stringWriter, data interface{}) error {
dataReplacer.WriteString(w, fmt.Sprint(data))
_, _ = dataReplacer.WriteString(w, fmt.Sprint(data))
if strings.HasPrefix(data.(string), "data") {
w.writeString("\n\n")
_, _ = w.writeString("\n\n")
}
return nil
}
Expand Down

0 comments on commit cdee618

Please sign in to comment.