How to name a function in Go, CamelCase or Semi-CamelCase?

Answer • 1 Asked • Jan 14 2020
I want to write a function in Go to insert a document into a collection in a MongoDB database. Which way to name the function is better,
  • writeToMongoDB or
  • WriteToMongoD?

The second is CamelCase, while I saw someone using the style of the first one, so I am not sure which one is more appropriate. Thanks.

Write your answer...

On a mission to build Next-Gen Community Platform for Developers