Compare commits
4 Commits
v1.0.0
...
fee2381a45
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fee2381a45 | ||
![]() |
a92a4d9fde | ||
3a243546e9 | |||
d6d5466597 |
@@ -1,7 +1,14 @@
|
||||
package models
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
type Data struct {
|
||||
Action string `json:"action"`
|
||||
Action string `json:"action,omitempty"`
|
||||
Topic string `json:"topic"`
|
||||
Data any `json:"data"`
|
||||
}
|
||||
|
||||
func (*Data) ReadData(data []byte) (request Data, err error) {
|
||||
err = json.Unmarshal(data, &request)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user