package helpers import ( "regexp" "time" ) func CleanString(input string) string { return regexp.MustCompile("[^a-zA-Z0-9]+").ReplaceAllString(input, "") } func HeaderTimeStamp(t time.Time) [8]int16 { year := t.Year() % 100 timeStamp := [8]int16{ int16(20), int16(year), int16(t.Month()), int16(t.Day()), int16(t.Hour()), int16(t.Minute()), int16(t.Second()), int16(t.Nanosecond() / 1e6), } return timeStamp }