// 字节的单位转换 保留两位小数
func formatFileSize(fileSize int64) (size string) {
   if fileSize < 1024 {
      //return strconv.FormatInt(fileSize, 10) + "B"
      return fmt.Sprintf("%.2fB", float64(fileSize)/float64(1))
   } else if fileSize < (1024 * 1024) {
      return fmt.Sprintf("%.2fKB", float64(fileSize)/float64(1024))
   } else if fileSize < (1024 * 1024 * 1024) {
      return fmt.Sprintf("%.2fMB", float64(fileSize)/float64(1024*1024))
   } else if fileSize < (1024 * 1024 * 1024 * 1024) {
      return fmt.Sprintf("%.2fGB", float64(fileSize)/float64(1024*1024*1024))
   } else if fileSize < (1024 * 1024 * 1024 * 1024 * 1024) {
      return fmt.Sprintf("%.2fTB", float64(fileSize)/float64(1024*1024*1024*1024))
   } else { //if fileSize < (1024 * 1024 * 1024 * 1024 * 1024 * 1024)
      return fmt.Sprintf("%.2fEB", float64(fileSize)/float64(1024*1024*1024*1024*1024))
   }
}