Skip to content

Commit

Permalink
fix: change DefaultResolvConfPath to var instead of const
Browse files Browse the repository at this point in the history
This change allows users to override the default resolv.conf path by `-ldflags '-X "github.com/mr-karan/doggo/pkg/config.DefaultResolvConfPath=/another/path/to/resolv.conf"'`
  • Loading branch information
cions authored and mr-karan committed Sep 27, 2024
1 parent 6f1382d commit 6dc6fc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/config_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

// DefaultResolvConfPath specifies path to default resolv config file on UNIX.
const DefaultResolvConfPath = "/etc/resolv.conf"
var DefaultResolvConfPath = "/etc/resolv.conf"

// GetDefaultServers get system default nameserver
func GetDefaultServers() ([]string, int, []string, error) {
Expand Down

0 comments on commit 6dc6fc4

Please sign in to comment.