gosumer icon indicating copy to clipboard operation
gosumer copied to clipboard

Allow the user to customize the structure of the Message

Open Romaixn opened this issue 2 years ago • 2 comments

Currently, the process function takes a message parameter of type any. I would like the user to be able to create their own custom structure and use it directly in the process function.

For example, in the example instead of passing message any, passing message Message :

type Message struct {
	ID     int `json:"id"`
	Number int `json:"number"`
}

func processMessage(message Message, err chan error) {
}

Romaixn avatar Jul 19 '23 12:07 Romaixn

@Romaixn label this issue with hacktoberfest-accepted, I would like to work on this

sudhir512kj avatar Oct 16 '23 13:10 sudhir512kj

I assigned you the ticket, feel free to submit a PR 👍🏻

Romaixn avatar Oct 16 '23 13:10 Romaixn