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:
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user