Documentation ¶
Index ¶
Constants ¶
View Source
const REPLY_TO_ADDRESS string = "%s@commanigy-diary.appspotmail.com"
Variables ¶
View Source
var AppHelpers = template.FuncMap{ "menu_css_class": func(actualName string, templateName string) (string, error) { if actualName == templateName { return "active", nil } return "", nil }, "formattedDiaryEntryDate": func(diaryEntryDate time.Time) (string, error) { return diaryEntryDate.Format("Monday, January 2"), nil }, "authenticated": func(username string) (bool, error) { return len(username) > 0, nil }, "dict": func(values ...interface{}) (map[string]interface{}, error) { if len(values)%2 != 0 { return nil, errors.New("invalid dict call") } dict := make(map[string]interface{}, len(values)/2) for i := 0; i < len(values); i += 2 { key, ok := values[i].(string) if !ok { return nil, errors.New("dict keys must be strings") } dict[key] = values[i+1] } return dict, nil }, }
Functions ¶
Types ¶
type AppConfiguration ¶
type DiaryEntry ¶
Click to show internal directories.
Click to hide internal directories.