Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Fix typo and replaced deprecated ioutil package.
Browse files Browse the repository at this point in the history
  • Loading branch information
mneverov committed Aug 22, 2023
1 parent c1c43b4 commit 82bbfbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backends/ipvs/internal/ipvs/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type procSysctl struct {

// GetSysctl returns the value for the specified sysctl setting
func (*procSysctl) GetSysctl(sysctl string) (int, error) {
data, err := ioutil.ReadFile(path.Join(sysctlBase, sysctl))
data, err := os.ReadFile(path.Join(sysctlBase, sysctl))
if err != nil {
return -1, err
}
Expand All @@ -64,7 +64,7 @@ func (*procSysctl) GetSysctl(sysctl string) (int, error) {

// SetSysctl modifies the specified sysctl flag to the new value
func (*procSysctl) SetSysctl(sysctl string, newVal int) error {
return ioutil.WriteFile(path.Join(sysctlBase, sysctl), []byte(strconv.Itoa(newVal)), 0640)
return os.WriteFile(path.Join(sysctlBase, sysctl), []byte(strconv.Itoa(newVal)), 0640)
}

// EnsureSysctl sets a kernel sysctl to a given numeric value.
Expand Down
2 changes: 1 addition & 1 deletion backends/ipvs/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (b *backend) Setup() {
// right now it's a No-Op, will shift ipset initialization there
err = controller.ipsetsManager.Setup()
if err != nil {
klog.Fatal("unable to initialize ipvs manager", "error", err)
klog.Fatal("unable to initialize ipsets manager", "error", err)
}

// initialize ip sets
Expand Down

0 comments on commit 82bbfbb

Please sign in to comment.