(actions []string)
| 279 | } |
| 280 | |
| 281 | func parseActions(actions []string) []*pb.ActionItem { |
| 282 | if len(actions) <= 0 { |
| 283 | return nil |
| 284 | } |
| 285 | if len(actions) > 4 { |
| 286 | actions = actions[:4] |
| 287 | } |
| 288 | acts := []*pb.ActionItem{} |
| 289 | for _, act := range actions { |
| 290 | ss := strings.SplitN(act, "|", 2) |
| 291 | if len(ss) > 1 { |
| 292 | item := &pb.ActionItem{ |
| 293 | Type: pb.ActType_ActURL, |
| 294 | Name: ss[0], |
| 295 | Link: ss[1], |
| 296 | } |
| 297 | acts = append(acts, item) |
| 298 | } |
| 299 | } |
| 300 | return acts |
| 301 | } |
no outgoing calls
no test coverage detected