Skip to content

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

@khumps

Description

@khumps

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions