Hi,

I'm working on a program which will have a prompt to enter commands like:

    add "foo bar"

I need what os.Args provides but on custom input so to above input I would
like to get:

    []string{"add", "foo bar"}

Package os uses runtime_args(), and it isn't exported nor accepts input.
Any idea what can I use instead? As a fallback, I can always implement
something like https://stackoverflow.com/a/46973603, but maybe there is a
smarter way to do it.

-- 
BR,
Michał Łowicki

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAKu9hcexcyMdjPaWUNd84q0Yhs_PoHCe-jczvhC04vqiU7LPwQ%40mail.gmail.com.

Reply via email to