Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Context structure #59

Merged
merged 4 commits into from
May 31, 2024
Merged

fix: Context structure #59

merged 4 commits into from
May 31, 2024

Conversation

vahidlazio
Copy link
Contributor

No description provided.

@vahidlazio vahidlazio force-pushed the context-structure branch from b5cbe57 to 60a01bb Compare May 30, 2024 12:46
@vahidlazio vahidlazio changed the title Context structure fix: Context structure May 30, 2024
@vahidlazio vahidlazio force-pushed the context-structure branch from 60a01bb to b310b69 Compare May 30, 2024 12:48
@vahidlazio vahidlazio force-pushed the context-structure branch from b310b69 to 4be06a7 Compare May 30, 2024 12:49
Copy link
Member

@fabriziodemaria fabriziodemaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice with a test, but nothing blocking

@@ -83,10 +83,14 @@ func (e Confidence) PutContext(key string, value interface{}) {
e.contextMap[key] = value
}

func (e Confidence) Track(ctx context.Context, eventName string, message map[string]interface{}) *sync.WaitGroup {
newMap := e.GetContext()
func (e Confidence) Track(ctx context.Context, eventName string, data map[string]interface{}) *sync.WaitGroup {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: eventName should be the first argument

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first context is coming from go, it's not confidence context. i think it's pretty standard to have the go context as the first parameter. you still think we should move it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah you are right, no probably makes sense to keep it there then

@vahidlazio vahidlazio merged commit d56de80 into main May 31, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants