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
Hey ops people, you’re doing it wrong. (But we can fix it!)
Challenging operations teams on a commonly made mistake
Cloud SDKs Can Chain You Down
With the right level of abstraction over cloud resources, we can separate the responsibilities and concerns of developers and operations teams.
Polyglot projects made easy with Nitric
Nitric makes building cloud applications in multiple languages a breeze
Get the most out of Nitric
Ship your first app faster with Next-gen infrastructure automation