github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/singletons/templates/create.go (about)

     1  package templates
     2  
     3  import git "github.com/taubyte/go-simple-git"
     4  
     5  var _templates *templates
     6  
     7  func getOrCreateTemplates() *templates {
     8  	if _templates == nil {
     9  		err := loadTemplates()
    10  		if err != nil {
    11  			panic(err)
    12  		}
    13  	}
    14  
    15  	return _templates
    16  }
    17  
    18  func (t *templates) Repository() *git.Repository {
    19  	return t.repository
    20  }