-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpersona.go
39 lines (31 loc) · 824 Bytes
/
persona.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"fmt"
"github.com/AlecAivazis/survey/v2"
"github.com/urfave/cli/v2"
)
func PersonaCommand(ctx *cli.Context) error {
answers := struct {
Product string
}{}
survey.Ask([]*survey.Question{
{
Name: "product",
Prompt: &survey.Input{
Message: "Describe your product:",
},
Validate: survey.Required,
},
}, &answers)
s := CreateSpinner()
s.Suffix = " Generating user personas for the product 🪄\n"
s.Start()
result, err := AskAI(fmt.Sprintf(`Create a few user personas with name alliterations and different backgrounds for %s. Also add behavior, needs and wants, demographics to each persona`, answers.Product))
s.Stop()
if err != nil {
return err
}
fmt.Println(boldGreen("\n✅ User personas generated successfully 🐙\n"))
fmt.Println(result)
return nil
}