package models import ( "encoding/xml" "time" ) type FileHeader struct { XMLName xml.Name `xml:"fileHeader"` CompanyName string `xml:"companyName,attr"` ProductName string `xml:"productName,attr"` ProductVersion string `xml:"productVersion,attr"` CreationDateTime string `xml:"creationDateTime,attr"` } func (f *FileHeader) SetCurrentCreationDateTime() { //format "2026-08-25T21:35:38.4736792" f.CreationDateTime = time.Now().Format("2006-01-02T15:04:05.0000000") }