Files
checky/main.go

28 lines
308 B
Go
Raw Normal View History

2022-03-15 04:43:03 +00:00
package main
import "fmt"
import "github.com/google/uuid"
func main() {
2022-03-15 16:27:52 +00:00
store := NewStore("foo")
2022-03-15 04:43:03 +00:00
2022-03-15 16:27:52 +00:00
out := &Template{
Id: uuid.NewString(),
Test: "round trip",
}
2022-03-15 04:43:03 +00:00
2022-03-15 16:27:52 +00:00
store.Write(out)
2022-03-15 04:43:03 +00:00
2022-03-15 16:27:52 +00:00
in := &Template{
Id: out.Id,
}
2022-03-15 04:43:03 +00:00
2022-03-15 16:27:52 +00:00
store.Read(in)
2022-03-15 04:43:03 +00:00
2022-03-15 16:27:52 +00:00
fmt.Printf("%+v\n", in)
bus := NewBus()
bus.Announce(in)
2022-03-15 04:43:03 +00:00
}