truncateTaskURL removes extra query parameters from task applink, keeping only guid.
(u string)
| 160 | |
| 161 | // truncateTaskURL removes extra query parameters from task applink, keeping only guid. |
| 162 | func truncateTaskURL(u string) string { |
| 163 | if u == "" { |
| 164 | return "" |
| 165 | } |
| 166 | if idx := strings.Index(u, "&"); idx != -1 { |
| 167 | return u[:idx] |
| 168 | } |
| 169 | return u |
| 170 | } |
| 171 | |
| 172 | // parseTimeFlagSec parses a time flag that can be absolute (ISO 8601, timestamp) or relative (+/- Nd/w/m/h). |
| 173 | // It returns the Unix seconds string. |
no outgoing calls
no test coverage detected