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

feat: add domains table #2225

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: add domains table #2225

wants to merge 2 commits into from

Conversation

ozym
Copy link
Contributor

@ozym ozym commented Sep 16, 2024

This adds a simple domains table as the first step to linking delta with tilde

This adds a simple domains table as the first step to linking delta with tilde
@ozym ozym requested review from a team as code owners September 16, 2024 04:55
@ozym ozym self-assigned this Sep 16, 2024
@ozym ozym added the enhancement New feature development work label Sep 16, 2024
Copy link
Contributor

@elidana elidana left a comment

Choose a reason for hiding this comment

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

looks good but haven't fully reviewed the code

Comment on lines +37 to +38
row.Name,
row.Description,

Choose a reason for hiding this comment

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

nitpick: probably never a problem in practice, but in theory:

d1 := DomainList{ Domain{ Name: "with space "}}
var d2 DomainList
d2.decode(d1.encode())
// d1[0].Name != d2[0].Name

Comment on lines +265 to +271
for _, v := range s.domains {
if name != v.Name {
continue
}
return v, true
}
return Domain{}, false

Choose a reason for hiding this comment

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

suggestion: have you considered slices package, might be more concise...(7 LOC later)...nevermind 😑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature development work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants