Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Add template for golang functions #79

Closed
0xdevalias opened this issue Sep 5, 2017 · 9 comments
Closed

Proposal: Add template for golang functions #79

0xdevalias opened this issue Sep 5, 2017 · 9 comments

Comments

@0xdevalias
Copy link

Expected Behaviour

Currently there are templates for: csharp, node, python, ruby. It would be great to have a go template as well.

There is a golang base function in the main FaaS repository that can be used as a base. Though this could be improved even more using Docker multi-stage build syntax, and separating the golang compilation environment from the run environment (eg. static compilation)

The faas-cli new command would also need to be updated to include this new template.

@alexellis
Copy link
Member

Derek add label: skill/intermediate

@ghost ghost added the skill/intermediate label Sep 6, 2017
@alexellis
Copy link
Member

Want to have a go at this @alias1?

@rgee0
Copy link
Contributor

rgee0 commented Sep 8, 2017

Derek add label: proposal

@ghost ghost added the proposal label Sep 8, 2017
@alexellis
Copy link
Member

@rgee0 how practical is it to template with Golang? Should we generate a "Dockerfile" version with all the assets in the handler folder? I have the impression third party dependencies are often required beyond what you can pull with vndr or similar.

@alexellis
Copy link
Member

I agree that we can make Hubstats multi-stage and the base Golang sample. Can someone do that initially?

@rgee0
Copy link
Contributor

rgee0 commented Sep 8, 2017

@alexellis initial thought was that Golang is potentially closer to the .exe use cases. However, if we are going to include the build in the template then I think we head into the territory you're alluding to. I'm not experienced enough with vndr to comment on that specifically. What fuels you impression?

@alexellis
Copy link
Member

Here's an idea - let Golang generate a Docker build. That way it's still a template but you are expected to hack on the Dockercon etc

@0xdevalias
Copy link
Author

This seems to have landed in #145 with some additional work in #146

@alexellis
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants