INNER CODE UNIT · Go
SetPortConnection
caohoangnam/go-clean-architecture · config/database.go:151
func SetPortConnection(Port string) {
port = Port
}
func GetPortConnection() string {
return port
}
func onMeowCreated(m events.MeowCreatedMessage) {
meow := domain.Meow{
Id: m.Id,
Body: m.Body,
CreatedAt: m.CreatedAt,
}
if err := search.Create(context.Background(), meow); err != nil {
log.Println(err)
}
}