#6 usermanager.PageUserParams{"0", "", template, user.Username, "", user.Admin, []string{"ayy", "lmao"}} vereinfachen

已关闭
Moe9 年之前创建 · 2 条评论

PageParams, PageUserParams, ... in ein Einheitliches Prinzip

PageParams, PageUserParams, ... in ein Einheitliches Prinzip
Moritz Schmidt 评论于 9 年之前
所有者

WIRD NICHT UMGESETZT

PageParams:

  • NotificationType:
    • -1: No notification
    • 0: Error
    • 1: Success
  • Notification:
    • Empty string or string with const-Error
  • ReqDir:
    • Empty string or string with current location (GET/POST location)
  • Username:
    • Empyty string: not logged in, else username
  • IsAdmin
    • 0: User
    • 1: Admin
  • Custom:
    • String-Array/slice for custom params etc.

Outsource to:

  • [x] templatehelpers

  • +: richtige Datentypen (int für UserID, string f. name usw.)

WIRD NICHT UMGESETZT ==================== PageParams: - NotificationType: - -1: No notification - 0: Error - 1: Success - Notification: - Empty string or string with const-Error - ReqDir: - Empty string or string with current location (GET/POST location) - Username: - Empyty string: not logged in, else username - IsAdmin - 0: User - 1: Admin - Custom: - String-Array/slice for custom params etc. Outsource to: - [x] templatehelpers - +: richtige Datentypen (int für UserID, string f. name usw.)
Moritz Schmidt 评论于 9 年之前
所有者

WIRD UMGESETZT

Alternative: 100% Dynamisch machen, ein großer String-Slice, der jeweils dynamisch verarbeitet wird.

  • golang maps (https://blog.golang.org/go-maps-in-action)

  • -: einheitlicher datentyp (string)

  • NotificationType:

    • -1: No notification
    • 0: Error
    • 1: Success
  • Notification:

    • Empty string or string with const-Error
  • Custom:

    • String-Array/slice for custom params etc.

DONE:

  • admin:
    • 1: Admin
    • ""(?): k. Admin
  • reqDir:
    • Empty string or string with current location (GET/POST location)
  • username:
    • Empyty string: not logged in, else username
WIRD UMGESETZT ============== Alternative: 100% Dynamisch machen, ein großer String-Slice, der jeweils dynamisch verarbeitet wird. - golang maps (https://blog.golang.org/go-maps-in-action) - -: einheitlicher datentyp (string) - NotificationType: - -1: No notification - 0: Error - 1: Success - Notification: - Empty string or string with const-Error - Custom: - String-Array/slice for custom params etc. DONE: - admin: - 1: Admin - ""(?): k. Admin - reqDir: - Empty string or string with current location (GET/POST location) - username: - Empyty string: not logged in, else username
Moe9 年之前 关闭
登录 并参与到对话中。
未选择标签
未选择里程碑
未指派成员
1 名参与者
正在加载...
取消
保存
这个人很懒,什么都没留下。