From d5cb327620649d1b42905cb786fc529f1eb4a98e Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Wed, 18 Jun 2025 17:27:16 +0700 Subject: [PATCH] docs: improve test resolv.conf handling documentation Improve documentation for Test_prog_parseResolvConfNameservers to clarify that the old implementation was removed as part of code deduplication effort. The code for handling resolv.conf was unified into the resolvconffile package to provide a consistent interface across the codebase. This change provides better context for future developers about why the refactoring was done and what benefits it brings. --- cmd/cli/resolvconf_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/cli/resolvconf_test.go b/cmd/cli/resolvconf_test.go index 9ee7e3b..9d93607 100644 --- a/cmd/cli/resolvconf_test.go +++ b/cmd/cli/resolvconf_test.go @@ -33,6 +33,11 @@ func oldParseResolvConfNameservers(path string) ([]string, error) { return currentNS, nil } +// Test_prog_parseResolvConfNameservers tests the parsing of nameservers from resolv.conf content. +// Note: The previous implementation was removed to reduce code duplication and consolidate +// the resolv.conf handling logic into a single unified approach. All resolv.conf parsing +// is now handled by the resolvconffile package, which provides a consistent interface +// for both reading and modifying resolv.conf files across different platforms. func Test_prog_parseResolvConfNameservers(t *testing.T) { oldNss, _ := oldParseResolvConfNameservers(resolvconffile.Path) p := &prog{}