This is a great question. In the go code, I try to have the convention of "new" is usually just a memory allocation/simple init, fast and no error possible. "make" can fail. "create" is for creating new persisted entities.
However, I did not stick with the convention for the commands (why??) and in this case the function name is reflective of the command.
This is a great question. In the go code, I try to have the convention of "new" is usually just a memory allocation/simple init, fast and no error possible. "make" can fail. "create" is for creating new persisted entities.
However, I did not stick with the convention for the commands (why??) and in this case the function name is reflective of the command.
Originally posted by @levb in https://github.com/mattermost/mattermost-plugin-solar-lottery/pull/27