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

Introduce custom type StringWithAltValues #991

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

chrismarget-j
Copy link
Collaborator

@chrismarget-j chrismarget-j commented Dec 10, 2024

StringWithAltValues is a custom type which supports semantic equality.

foo := NewStringWithAltValuesValue("foo", "bar", "bar") // alternate values: "bar" and "bar"
bar := NewStringWithAltValuesValue("bar")
foo.Equal(bar) // false
foo.StringSemanticEquals(ctx, bar) // true

My hope is to use this type in cases like leaf=>VN bindings where the API accepts a leaf switch ID but returns the leaf redundancy group ID.

Closes #990

@chrismarget-j chrismarget-j linked an issue Dec 10, 2024 that may be closed by this pull request
@chrismarget-j chrismarget-j merged commit bd03e0f into main Dec 20, 2024
1 check passed
@chrismarget-j chrismarget-j deleted the 990-introduce-custom-type-stringwithaltvalues branch December 20, 2024 20:52
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.

Introduce custom type: StringWithAltValues
2 participants