Refactor: rename module

This commit is contained in:
kayos@tcp.direct 2023-12-02 00:23:34 -08:00
parent 1cbb831f4d
commit ac1a18a304
Signed by: kayos
GPG Key ID: 4B841471B4BEE979
4 changed files with 15 additions and 4 deletions

@ -1,4 +1,4 @@
package iface
package ifupdown
import "errors"

@ -1,4 +1,4 @@
package iface
package ifupdown
import (
"bufio"
@ -110,9 +110,10 @@ func (iface *NetworkInterface) allocate() {
if iface.RWMutex == nil {
iface.RWMutex = &sync.RWMutex{}
}
iface.Lock()
iface.Lock() // gets unlocked in other methods
iface.dirty = true
iface.allocated = true
}
func (iface *NetworkInterface) err() error {

@ -1,4 +1,4 @@
package iface
package ifupdown
import (
"bufio"

10
util.go Normal file

@ -0,0 +1,10 @@
package ifupdown
import "git.tcp.direct/kayos/common/pool"
type poolGroup struct {
Buffers pool.BufferFactory
Strs pool.StringFactory
}
var pools = poolGroup{Buffers: pool.NewBufferFactory(), Strs: pool.NewStringFactory()}