mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Appease go vet
s complaints about passing locks by value
This commit is contained in:
parent
b77a99b565
commit
dd927050d9
1 changed files with 4 additions and 4 deletions
|
@ -70,8 +70,8 @@ type GeoIPv6Table struct {
|
||||||
lock sync.Mutex // synchronization for geoip table accesses and reloads
|
lock sync.Mutex // synchronization for geoip table accesses and reloads
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table GeoIPv4Table) Len() int { return len(table.table) }
|
func (table *GeoIPv4Table) Len() int { return len(table.table) }
|
||||||
func (table GeoIPv6Table) Len() int { return len(table.table) }
|
func (table *GeoIPv6Table) Len() int { return len(table.table) }
|
||||||
|
|
||||||
func (table *GeoIPv4Table) Append(entry GeoIPEntry) {
|
func (table *GeoIPv4Table) Append(entry GeoIPEntry) {
|
||||||
(*table).table = append(table.table, entry)
|
(*table).table = append(table.table, entry)
|
||||||
|
@ -80,8 +80,8 @@ func (table *GeoIPv6Table) Append(entry GeoIPEntry) {
|
||||||
(*table).table = append(table.table, entry)
|
(*table).table = append(table.table, entry)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table GeoIPv4Table) ElementAt(i int) GeoIPEntry { return table.table[i] }
|
func (table *GeoIPv4Table) ElementAt(i int) GeoIPEntry { return table.table[i] }
|
||||||
func (table GeoIPv6Table) ElementAt(i int) GeoIPEntry { return table.table[i] }
|
func (table *GeoIPv6Table) ElementAt(i int) GeoIPEntry { return table.table[i] }
|
||||||
|
|
||||||
func (table *GeoIPv4Table) Lock() { (*table).lock.Lock() }
|
func (table *GeoIPv4Table) Lock() { (*table).lock.Lock() }
|
||||||
func (table *GeoIPv6Table) Lock() { (*table).lock.Lock() }
|
func (table *GeoIPv6Table) Lock() { (*table).lock.Lock() }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue