()
| 88 | } |
| 89 | |
| 90 | func (v *LogView) AsTableRow() []string { |
| 91 | typ, desc := v.typeDesc() |
| 92 | |
| 93 | clientName := v.GetClientName() |
| 94 | if clientName == "" { |
| 95 | clientName = ansi.Faint(notApplicable) |
| 96 | } |
| 97 | |
| 98 | conn := v.getConnection() |
| 99 | if conn == notApplicable { |
| 100 | conn = ansi.Faint(truncate(conn, 20)) |
| 101 | } else { |
| 102 | conn = truncate(conn, 20) |
| 103 | } |
| 104 | |
| 105 | return []string{ |
| 106 | typ, |
| 107 | truncate(desc, 54), |
| 108 | truncate(v.GetDate().Format("Jan 02 15:04:05.000"), 20), |
| 109 | conn, |
| 110 | clientName, |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | func (v *LogView) Object() interface{} { |
| 115 | return v.raw |
no test coverage detected