The Hugo source code base is one of the most ill-conceived, over-engineered, poorly styled and conceived code bases in all of the Go FOSS community. There are a lot of great examples of good Go programming (like kind
from BenTheElder) but the Hugo project is written by people who have no fucking idea how to write sustainable enterprise code. Stay away from it if you want to learn good development practices.