mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-23 01:27:13 +02:00
refactor: move getDNS type to os_linux.go
Move getDNS type definition from dns.go to os_linux.go where it is used. Remove the now-empty dns.go file. This change improves code organization by keeping platform-specific types with their implementations.
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
package cli
|
|
||||||
|
|
||||||
//lint:ignore U1000 use in os_linux.go
|
|
||||||
type getDNS func(iface string) []string
|
|
||||||
@@ -28,6 +28,8 @@ import (
|
|||||||
|
|
||||||
const resolvConfBackupFailedMsg = "open /etc/resolv.pre-ctrld-backup.conf: read-only file system"
|
const resolvConfBackupFailedMsg = "open /etc/resolv.pre-ctrld-backup.conf: read-only file system"
|
||||||
|
|
||||||
|
type getDNS func(iface string) []string
|
||||||
|
|
||||||
// allocate loopback ip
|
// allocate loopback ip
|
||||||
// sudo ip a add 127.0.0.2/24 dev lo
|
// sudo ip a add 127.0.0.2/24 dev lo
|
||||||
func allocateIP(ip string) error {
|
func allocateIP(ip string) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user