# README
go-messaging
If you are beginning your journey with Senzing, please start with Senzing Quick Start guides.
You are in the Senzing Garage where projects are "tinkered" on. Although this GitHub repository may help you understand an approach to using Senzing, it's not considered to be "production ready" and is not considered to be part of the Senzing product. Heck, it may not even be appropriate for your application of Senzing!
:warning: WARNING: go-messaging is still in development :warning: _
At the moment, this is "work-in-progress" with Semantic Versions of 0.n.x
.
Although it can be reviewed and commented on,
the recommendation is not to use it yet.
Synopsis
The Senzing go-messaging
packages are used to create structured messages.
Overview
go-messaging
generates structured messages in multiple formats.
Currently, the JSON format and a slog-friendly format are supported.
Use
import "github.com/senzing-garage/go-messaging/messenger"
aMessenger, _ := messenger.New()
fmt.Println(aMessenger.NewJson(0001, "Bob", "Mary"))
fmt.Println(aMessenger.NewSlog(0001, "Bob", "Mary"))
Output:
{"time":"YYYY-MM-DDThh:mm:ss.nnnnnnnnn-00:00","level":"TRACE","id":"senzing-99990001","details":{"1":"Bob","2":"Mary"}}
[id senzing-99990001 details map[1:Bob 2:Mary]]
For more examples, see main.go.