Go - NewTopic()
This is reference documentation for the Nitric Go SDK. To learn about Topics in Nitric start with the Async Messaging docs.
Creates a new Topic.
import ("github.com/nitrictech/go-sdk/nitric")func main() {updates := nitric.NewTopic("updates")nitric.Run()}
Parameters
- Name
name
- Required
- Required
- Type
- string
- Description
The name of the topic to create.
Examples
Create a new topic
import ("github.com/nitrictech/go-sdk/nitric")func main() {updates := nitric.NewTopic("updates")nitric.Run()}
See also
Last updated on May 9, 2025