Files
aqi/ws/w_util_chain.go
2025-04-01 18:11:27 +08:00

28 lines
376 B
Go

package ws
func New(action string) *Action {
return &Action{
Action: action,
}
}
func (m *Action) WithId(id string) *Action {
m.Id = id
return m
}
func (m *Action) WithCode(code int) *Action {
m.Code = code
return m
}
func (m *Action) WithData(data any) *Action {
m.Data = data
return m
}
func (m *Action) WithMsg(msg string) *Action {
m.Msg = msg
return m
}