membphis commented on a change in pull request #1167: feature: auto import 
nameservers into APISIX from system resolv file.…
URL: https://github.com/apache/incubator-apisix/pull/1167#discussion_r384556438
 
 

 ##########
 File path: bin/apisix
 ##########
 @@ -525,6 +530,25 @@ local function check_or_version(cur_ver_s, need_ver_s)
     return true
 end
 
+
+local function system_dns_resolver()
+    local file, err = io.open("/etc/resolv.conf")
+    if err then
+        return nil, err
+    else
+        local lines = file:lines()
 
 Review comment:
   better style:
   
   ```
   local file = io.open("xx.xxx")
   for line in file:lines() do
       print(line) -- 这里就是每次取一行    
   end
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to