蛋蛋星球 后台端
 
 
 
 

12 wiersze
170 B

  1. package utils
  2. import (
  3. "path"
  4. "strings"
  5. )
  6. // 获取文件后缀
  7. func FileExt(fname string) string {
  8. return strings.ToLower(strings.TrimLeft(path.Ext(fname), "."))
  9. }