From the course: Cloud Native Projects: GCP Serverless
Unlock this course with a free trial
Join today to access over 25,400 courses taught by industry experts.
Deploying and running a Go Cloud Function - Google Cloud Platform Tutorial
From the course: Cloud Native Projects: GCP Serverless
Deploying and running a Go Cloud Function
- [Instructor] So now that we've written our cloud function in Go, it's time to deploy it, run it, and test it. I'm going to jump back into my IDE and open up the terminal once again. And from within this terminal, I'm going to do my gcloud functions deploy GoExample. Now, this matters because it must be the same name as the name of our function. I will set my runtime equal to go1.13 for Go 13, set my trigger to http, and this time, I'm going to do unauthenticated, so it doesn't prompt me. We'll go ahead and do our deployment and allow it to run. All right, now that that's uploaded, let's jump back over to the GCP console. We'll go ahead and do a refresh, and there is our code. Let's run a test on it. And like we've done before, we'll start with an empty body. We got a default message of "Hello World." That's considered the count to be zero. Let's specifically call out a count of two. You'll see that we get the same message…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.