Skip to content

How to disable slice ordering for a slice in an object #115

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

Open
khumps opened this issue Mar 13, 2025 · 0 comments
Open

How to disable slice ordering for a slice in an object #115

khumps opened this issue Mar 13, 2025 · 0 comments

Comments

@khumps
Copy link

khumps commented Mar 13, 2025

take the following object

type Struct struct {
 foo int
 bar string 
slice []string

and I have two instances

a := Struct{
foo: 1
bar: "foobar"
slice: ["a","b","c"]
}

b := Struct{
foo: 1
bar: "foobar"
slice: ["c","b","a"]
}

what modifiers do I need to add so that Struct.slice ignores order?

What if I have a parent struct

type Parent struct {
anotherSlice []string
child Struct
}

and anotherSlice requires strict order but child.slice does not?

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

No branches or pull requests

1 participant