Created
November 1, 2019 10:58
-
-
Save Cartmanishere/6a0bb9391c066d7b8e940089996d3187 to your computer and use it in GitHub Desktop.
Golang client for grpc-python-golang example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
client, err := InitGrpcConnection() | |
if err != nil { | |
fmt.Println(err) | |
os.Exit(0) | |
} | |
reader := bufio.NewReader(os.Stdin) | |
for { | |
fmt.Println("Enter some text: ") | |
text, _ := reader.ReadString('\n') | |
fmt.Println("Keywords:") | |
keywords, err := client.MyKeywords(text) | |
if err != nil { | |
fmt.Println(err) | |
continue | |
} | |
fmt.Println(keywords) | |
fmt.Println() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment