Skip to content

Commit

Permalink
fix(linting): resolve linting issue with deprecated ioutil package
Browse files Browse the repository at this point in the history
  • Loading branch information
willejs committed Aug 22, 2024
1 parent 147f853 commit b4707c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/port_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package controller
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"log/slog"
"context"

Expand Down Expand Up @@ -35,7 +35,7 @@ func (c *PortController) UpsertPortsFromFile() error {
// Load ports data from JSON file
// I should open the file and get the handle here instead of reading it all into memory
c.logger.Info(fmt.Sprintf("Upserting ports from file: %s", c.config.PortFile), slog.String("component", "controller/port_controller"))
data, err := ioutil.ReadFile(c.config.PortFile)
data, err := os.ReadFile(c.config.PortFile)
if err != nil {
return err
}
Expand Down

0 comments on commit b4707c1

Please sign in to comment.