package response

import (
	"net/http"
	"strconv"
)

type Status struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func newStatus(code int) Status {
	message := http.StatusText(code)
	if message == "" {
		message = strconv.Itoa(code)
	}
	return Status{
		Code:    code,
		Message: message,
	}
}
