openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Allen <>
Subject Re: Interpretation of "main" for GoLang and ActionLoop docker images
Date Sun, 30 Sep 2018 20:38:49 GMT
Hi Michele,

From a someone who doesn't use Go, this all seems sensible and predictable to me, though I
have one question that may show my lack of knowledge of the language!

> Case4: sending a zip with source actions. Here is where the current rules turned out
to be very confusing. So I am going to simplify this way:
> You can upload all the files you want in your zip file, they must all have .go extension
and they will be compiled. You must NOT have a main.main function as this will be provided
by the runtime. The name of the main function will be interpreted as in 3: -main main (or
default) => main.Main , -main hello => main.Hello

Does this mean that I can't specify a different module other than main for entry point? e.g.
would  -main foo.Bar work and result in the Bar function in the foo package being the entry
point to the action?

This is on my mind as I'm considering updating the PHP (and Python?) runtimes to support setting
the file as well as the function name and would use the format -name foo.php:bar to run the
bar() function in foo.php as the entry point. (Currently, the filename is hardcoded to index.php).



> On 29 Sep 2018, at 09:03, Michele Sciabarra <> wrote:
> Hello all,
> I need to discuss my plan for simplifying rules for interpreting "main" for Golang. 
> The rules I have used for interpreting the "main" parameter in wsk turned out to be a
bit confusing, so I plan to make them simpler. This is what I plan to implement, please confirm
it is fine OR tell me if there is something I should change. The text below will go in documentation
if it is ok.
> ----

Development thoughts at
Daily Jotter for macOS at

View raw message