Skip to content

Commit

Permalink
Fix lint suggettion
Browse files Browse the repository at this point in the history
  • Loading branch information
RealAlexandreAI committed Apr 29, 2024
1 parent defa891 commit d48d8fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/jsonrepair-cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"flag"
"fmt"
"io/ioutil"
"os"

"github.com/RealAlexandreAI/json-repair"
)
Expand Down Expand Up @@ -62,7 +62,7 @@ func main() {
fmt.Println("---")
}

fi, err := ioutil.ReadFile(file)
fi, err := os.ReadFile(file)
if err != nil {
fmt.Printf("[json-repair] invalid file path: %s", file)
fmt.Println()
Expand Down
1 change: 1 addition & 0 deletions jsonrepair.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func MustRepairJSON(src string) (dst string) {

if json.Valid([]byte(src)) {
buf := &bytes.Buffer{}
//nolint
json.Compact(buf, []byte(src))
dst = buf.String()
return
Expand Down

0 comments on commit d48d8fd

Please sign in to comment.