We recently introduced experimental support for the Go programming language. This is a significant milestone for us, and we are eager to share with you the fantastic capabilities Nitric brings to building cloud-native Go applications.
To assist in getting started we have released full reference documentation and a detailed guide. The step-by-step guide will walk you through setting up a serverless REST API in Go, making it easier than ever to get your Go code running on the cloud. If you prefer a visual learning experience, we have released a video version of our guide:
With the introduction of Nitric for Go, we've made cloud application development more accessible and efficient. Our Go SDK combines straightforward cloud APIs with idiomatic Go syntax, enabling you to create cloud-native applications with ease. To illustrate, here's an example of how you can use Nitric to create an API that writes image data to a bucket:
import ("context""fmt""github.com/nitrictech/go-sdk/faas""github.com/nitrictech/go-sdk/nitric")func main() {publicApi, err := nitric.NewApi("public")if err != nil {return}profiles, err := nitric.NewBucket("profiles").With(nitric.BucketWriting)if err != nil {return}publicApi.Get("/hello", func(ctx *faas.HttpContext, _ faas.HttpHandler) (*faas.HttpContext, error) {imageData := ctx.Request.Data()err := profiles.File("users/bruce-wayne/profile.png").Write(context.TODO(), imageData)return ctx, err})if err := nitric.Run(); err != nil {fmt.Println(err)}}
We are excited to see the innovative applications you create using Nitric for Go. Try it out and come chat with us on Discord to let us know what you think.
Stay tuned for more updates and enhancements as we continue to evolve Nitric and the Go SDK.
Checkout the latest posts
Nitric adds Deno 2 support
Building applications with Deno 2 and Nitric
The Servers Behind Serverless
Examining the CPU hardware capabilities of AWS Lambda, Azure Container Apps and Google Cloud Run
Introducing Nitric for AI and More
Nitric Batch for ML, AI and high-performance compute workloads on AWS, Azure, GCP and more
Get the most out of Nitric
Ship your first app faster with Next-gen infrastructure automation