golang-im聊天
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.
 
 
 
 

20 lines
308 B

  1. package util
  2. import (
  3. "strconv"
  4. "strings"
  5. )
  6. func In(ids []int64) string {
  7. build := strings.Builder{}
  8. build.WriteString("(")
  9. for i := range ids {
  10. build.WriteString(strconv.FormatInt(ids[i], 10))
  11. if i != len(ids)-1 {
  12. build.WriteString(",")
  13. }
  14. }
  15. build.WriteString(")")
  16. return build.String()
  17. }