Ilya is a Cloud Native Architect, he is an expert in the world of cloud technologies and distributed systems. He helps SMBs to earn more and spend less with proper cloud decisions.
I think you can just use gopkg.in/yaml.v2 to encrypt any structure to YAML and print it to the file. So you don't need any special logic here, because your app prepares some data (which is out of the scope of how to push it to the file), and then you just need to save it.
You also can use default json or toml encoders if you want. No real need to build something extra.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think you can just use
gopkg.in/yaml.v2
to encrypt any structure to YAML and print it to the file. So you don't need any special logic here, because your app prepares some data (which is out of the scope of how to push it to the file), and then you just need to save it.You also can use default json or toml encoders if you want. No real need to build something extra.