code: func createTimeLimitCode(data string, minutes int, startInf interface{}) string {
  	format := "200601021504"
  
  	var start, end time.Time
  	var startStr, endStr string
  
  	if startInf == nil {
  		// Use now time create code
  		start = time.Now()
  		startStr = start.Format(format)
  	} else {
  		// use start string create code
  		startStr = startInf.(string)
  		start, _ = time.ParseInLocation(format, startStr, time.Local)
  		startStr = start.Format(format)
  	}
  
  	end = start.Add(time.Minute * time.Duration(minutes))
  	endStr = end.Format(format)
  
  	// create sha1 encode string
  	sh := sha1.New()
  	sh.Write([]byte(data + setting.SecretKey + startStr + endStr + com.ToStr(minutes)))
  	encoded := hex.EncodeToString(sh.Sum(nil))
  
  	code := fmt.Sprintf("%s%06d%s", startStr, minutes, encoded)
  	return code
  }
docs: // create a time limit code
  // code format: 12 length date time string + 6 minutes string + 40 sha1 encoded string