Skip to content
This repository was archived by the owner on Jun 21, 2019. It is now read-only.

Commit 4b08eae

Browse files
committed
Add support for comma-separated titles in prospect command
Example usage: clearbit prospect -title CEO,COO company.com Closes #17
1 parent c4f6587 commit 4b08eae

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

cmd/clearbit/prospect.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"github.com/codegangsta/cli"
55
"github.com/thoughtbot/clearbit"
6+
"strings"
67
)
78

89
var prospectCommand = cli.Command{
@@ -27,9 +28,14 @@ func prospect(ctx *cli.Context) error {
2728
name = ctx.String("name")
2829
role = ctx.String("role")
2930
seniority = ctx.String("seniority")
30-
titles = ctx.StringSlice("title")
31+
titlesCSV = ctx.StringSlice("title")
3132
)
3233

34+
titles := make([]string, 0)
35+
for _, title := range titlesCSV {
36+
titles = append(titles, strings.Split(title, ",")...)
37+
}
38+
3339
if domain == "" {
3440
return requiredArgError("Usage: clearbit prospect <domain>")
3541
}

0 commit comments

Comments
 (0)