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.

16 lines
191B

  1. package storage
  2. import (
  3. "net"
  4. )
  5. var ipSet = make(map[string]bool)
  6. func IsIPVoted(ip net.IP) bool {
  7. return ipSet[ip.String()]
  8. }
  9. func MarkVoted(ip net.IP) {
  10. ipSet[ip.String()] = true
  11. }