mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-09 16:35:12 +00:00
17 lines
203 B
Go
17 lines
203 B
Go
package gateway
|
|
|
|
type Shard [2]int
|
|
|
|
func DefaultShard() *Shard {
|
|
var s = Shard([2]int{0, 1})
|
|
return &s
|
|
}
|
|
|
|
func (s Shard) ShardID() int {
|
|
return s[0]
|
|
}
|
|
|
|
func (s Shard) NumShards() int {
|
|
return s[1]
|
|
}
|