cleanup: fix errors in wrapped format and log capitalization in proxy

Signed-off-by: wangyx1992 <wang.yixiang@zte.com.cn>
This commit is contained in:
wangyx1992
2021-04-21 11:28:39 +08:00
parent 657d93c4cc
commit c85e567a3d
9 changed files with 25 additions and 25 deletions

View File

@@ -621,7 +621,7 @@ func (handle *LinuxKernelHandler) GetModules() ([]string, error) {
kernelConfigFile := fmt.Sprintf("/boot/config-%s", kernelVersionStr)
kConfig, err := ioutil.ReadFile(kernelConfigFile)
if err != nil {
return nil, fmt.Errorf("Failed to read Kernel Config file %s with error %v", kernelConfigFile, err)
return nil, fmt.Errorf("failed to read Kernel Config file %s with error %w", kernelConfigFile, err)
}
for _, module := range ipvsModules {
if match, _ := regexp.Match("CONFIG_"+strings.ToUpper(module)+"=y", kConfig); match {
@@ -631,7 +631,7 @@ func (handle *LinuxKernelHandler) GetModules() ([]string, error) {
return bmods, nil
}
if err != nil {
return nil, fmt.Errorf("Failed to read file /proc/modules with error %v", err)
return nil, fmt.Errorf("failed to read file /proc/modules with error %w", err)
}
defer modulesFile.Close()