Improve form and template usage (#66)
* Improve form and template usage.
This commit is contained in:
parent
5f66b0ee71
commit
97bef0257e
22 changed files with 341 additions and 274 deletions
|
|
@ -48,8 +48,8 @@ func Danger(ctx echo.Context, message string) {
|
|||
Set(ctx, TypeDanger, message)
|
||||
}
|
||||
|
||||
// Set adds a new flash message of a given type into the session storage
|
||||
// Errors will logged and not returned
|
||||
// Set adds a new flash message of a given type into the session storage.
|
||||
// Errors will be logged and not returned.
|
||||
func Set(ctx echo.Context, typ Type, message string) {
|
||||
if sess, err := getSession(ctx); err == nil {
|
||||
sess.AddFlash(message, string(typ))
|
||||
|
|
@ -57,8 +57,8 @@ func Set(ctx echo.Context, typ Type, message string) {
|
|||
}
|
||||
}
|
||||
|
||||
// Get gets flash messages of a given type from the session storage
|
||||
// Errors will logged and not returned
|
||||
// Get gets flash messages of a given type from the session storage.
|
||||
// Errors will be logged and not returned.
|
||||
func Get(ctx echo.Context, typ Type) []string {
|
||||
var msgs []string
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue