for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
package views
type HTTPResponseVM struct {
Data interface{} `json:"data"`
Message string `json:"message"`
}
func NewHTTPResponseVM(message string, data interface{}) HTTPResponseVM {
return HTTPResponseVM{
Message: message,
Data: data,
func NewHTTPResponseVMFromError(err error) HTTPResponseVM {
Message: err.Error(),
Data: nil,