I am doing an ldap query, and I want to populate the result into a slice. The result looks something like
objectClass [top person organizationalPerson user]
cn [user.1]
sn [one]
description [user.1]
givenName [user]
distinguishedName [CN=user.1,OU=random,DC=example,DC=com]
...
I am trying to populate it to a map and for that, I created a type.
type keyvalue map[string]interface{}
Now I want to create a slice of this type, so that the data would look something like this for multiple users taken
objectClass [top person organizationalPerson user]
cn [user.1]
sn [one]
description [user.1]
givenName [user]
distinguishedName [CN=user.1,OU=random,DC=example,DC=com]
...
objectClass [top person organizationalPerson user]
cn [user.2]
sn [one]
description [user.2]
givenName [user]
distinguishedName [CN=user.2,OU=random,DC=example,DC=com]
...
For that, I created a slice of the type that I created above.
userslice := make([]keyvalue, 1, 1)
How will I append each users's parameters into the slice in each iteration?