I am trying to generate a map and then convert that to a yaml file like this:
uid :
kasi:
cn: Chaithra
street: fkmp
nandan:
c
@Makpoc already answered the question. just adding some extra info.
Map types are reference types, like pointers or slices, and so the value of m above is nil; it doesn't point to an initialized map. A nil map behaves like an empty map when reading, but attempts to write to a nil map will cause a runtime panic; don't do that. more info about Map