Skip to content

Commit

Permalink
chore: update practices from deprecated ioutil to os (#4769)
Browse files Browse the repository at this point in the history
  • Loading branch information
alarconesparza authored Dec 10, 2024
1 parent 12f0c30 commit 062014a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions videointelligence/annotate/text_detection.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"os"

video "cloud.google.com/go/videointelligence/apiv1"
videopb "cloud.google.com/go/videointelligence/apiv1/videointelligencepb"
Expand All @@ -41,9 +41,9 @@ func textDetection(w io.Writer, filename string) error {
}
defer client.Close()

fileBytes, err := ioutil.ReadFile(filename)
fileBytes, err := os.ReadFile(filename)
if err != nil {
return fmt.Errorf("ioutil.ReadFile: %w", err)
return fmt.Errorf("os.ReadFile: %w", err)
}

op, err := client.AnnotateVideo(ctx, &videopb.AnnotateVideoRequest{
Expand Down

0 comments on commit 062014a

Please sign in to comment.