golang 的 rabbitmq 消费项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

12 lines
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. }