获取举报原因
()
| 79 | |
| 80 | //获取举报原因 |
| 81 | func (this *Sys) GetReportReasons() (reasons map[string]string) { |
| 82 | reasons = make(map[string]string) |
| 83 | reasonStr := this.GetByField("ReportReasons").ReportReasons |
| 84 | if slice := strings.Split(reasonStr, "\n"); len(slice) > 0 { |
| 85 | for _, item := range slice { |
| 86 | if arr := strings.Split(item, ":"); len(arr) > 1 { |
| 87 | reasons[arr[0]] = strings.Join(arr[1:], ":") |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | return |
| 92 | } |
| 93 | |
| 94 | //根据序号获取举报原因 |
| 95 | func (this *Sys) GetReportReason(num interface{}) (reason string) { |
no test coverage detected