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).

Regards

Rob




> On 29 Sep 2018, at 09:03, Michele Sciabarra <[email protected]> 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.
> 
> ----
[snip]

-- 
Development thoughts at http://akrabat.com
Daily Jotter for macOS at http://dailyjotter.com

Reply via email to