Explain the use of Go's template package for generating dynamic text outputs?