Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Use Cobra to Build Go-Powered CLIs

Blog post from Twilio

Post Details
Company
Date Published
Author
Joseph Udonsak
Word Count
3,227
Language
English
Hacker News Points
-
Summary

$ go run main.go encrypt "Welcome to the hallowed chambers" --algorithm=caesar --key=54` This command executes the `encrypt` sub-command, passing the provided arguments and flags. The encrypted message is then printed to the console. Note that this requires a valid phone number for the recipient flag (`--recipient`) to be specified in order to send an SMS notification via Twilio.