a background
In order to unify the specification, it is decided to add comments in the project, including the header comments of the file and the comments of the function method. The comment of the function method is easy to say. It took a long time to comment on the header of the file (it was really easy after I finished it), and I recorded the process I made to facilitate others.
Two steps to set the header annotation
My system environment is Macos, and this article is for GoLand on Mac computers.
2.1 Construct header file comment template
Open GoLand, select `File And Code Templates` under `GoLand => Prefences => Editor`:
Select Includes
, create a File Header
file called:
The configuration is as follows:
// Package ${GO_PACKAGE_NAME}
// @Author: Joe.Wu
// @File: ${NAME}.go
// @Date: