Project Moscato Team Messaging Middleware Implemetation Message Middleware by Golang Operate as Secure, Effectively
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

list.go 856B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package modules
  2. /*
  3. Sub정보들을 관리할 list
  4. */
  5. type NameList struct {
  6. head *NameNode
  7. tail *NameNode
  8. size int
  9. }
  10. type NameNode struct {
  11. name []int64 // Encrypt된 name
  12. next *NameNode
  13. list List
  14. }
  15. type List struct {
  16. head *Node
  17. tail *Node
  18. size int
  19. }
  20. type Node struct {
  21. val []int64 // Encrypt된 value
  22. next *Node
  23. // single //
  24. single2sub_s []int // (val < x) sub#
  25. single2sub_es []int // (val <= x) sub#
  26. single2sub_b []int // (val > x) sub#
  27. single2sub_eb []int // (val >= x) sub#
  28. single2sub_e []int // (val == x) sub#
  29. // range //
  30. range2sub_s []int // (val < x and ...) sub#
  31. range2sub_es []int // (val <= x and ...) sub#
  32. range2sub_b []int // (val > x and ...) sub#
  33. range2sub_eb []int // (val >= x and ...) sub#
  34. }
  35. // ### To delete slice Array
  36. func remove(s []int, i int) []int {
  37. s[i] = s[len(s)-1]
  38. return s[:len(s)-1]
  39. }