package messageBox import ( "errors" "strings" ) func NewWarningBox(message string) string { return ` ` } func NewDangerBox(message string) string { return ` ` } func NewSuccessBox(message string) string { return ` ` } func EmptyMessageBox() string { return "
" } func NewMessageBox(message string, boxType ...string) (string, error) { if len(boxType) == 0 || boxType[0] == "" { // If no value is provided, default to success return ` `, nil } messageType := strings.ToLower(boxType[0]) if messageType != "success" && messageType != "danger" && messageType != "warning" { return "", errors.New("Invalid Message Box type") } return ` `, nil }