jmalloc / ax

A message-driven application toolkit for Go. [EXPERIMENTAL]
MIT License
9 stars 3 forks source link

Add convenience functions for parsing/generating various IDs #121

Closed koden-km closed 6 years ago

koden-km commented 6 years ago

Fixes #45

koden-km commented 6 years ago

I wasn't sure if i should change all places doing MessageID generation. I left the places currently doing it after envelope creation, like this:

env.MessageID.GenerateUUID()
codecov-io commented 6 years ago

Codecov Report

Merging #121 into master will increase coverage by 0.78%. The diff coverage is 93.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
+ Coverage   29.27%   30.05%   +0.78%     
==========================================
  Files          66       67       +1     
  Lines        2330     2352      +22     
==========================================
+ Hits          682      707      +25     
+ Misses       1637     1634       -3     
  Partials       11       11
Impacted Files Coverage Δ
src/ax/saga/mapping/direct/byfield.go 0% <0%> (ø) :arrow_up:
src/ax/saga/mapping/keyset/byfield.go 0% <0%> (ø) :arrow_up:
src/ax/saga/instance.go 100% <100%> (ø)
src/ax/envelope.go 100% <100%> (ø) :arrow_up:
src/ax/message.go 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f967b7b...d7b5807. Read the comment docs.

jmalloc commented 6 years ago

I wasn't sure if i should change all places doing MessageID generation

Yeah, anywhere that can be changed would be great. I only did them that way because I didn't have these sweet functions.

koden-km commented 6 years ago

I would need to replace the values in the envelope though, not just mutate the existing ones. Is that safe?

koden-km commented 6 years ago

Ah i guess i just use the new functions inside the construction braces. I'm still getting used to Go.