While reading some open source, I found the following code:
type Values map[string]string
But also:
type Value struct {
key string
value string
}
type Values []Value
So, are those two different? Thanks!
While reading some open source, I found the following code:
type Values map[string]string
But also:
type Value struct {
key string
value string
}
type Values []Value
So, are those two different? Thanks!
The maps are unordered, slices retains the order of insertion.