mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 19:25:16 +00:00
17 lines
343 B
Go
Executable File
17 lines
343 B
Go
Executable File
package example
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/micro/services/clients/go/answer"
|
|
"os"
|
|
)
|
|
|
|
// Ask a question and receive an instant answer
|
|
func AskAquestion() {
|
|
answerService := answer.NewAnswerService(os.Getenv("MICRO_API_TOKEN"))
|
|
rsp, err := answerService.Question(&answer.QuestionRequest{
|
|
Query: "microsoft",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|