chore: replace use of deprecated ioutil with os

This commit is contained in:
Nicholas Jackson
2023-09-21 17:03:30 -07:00
committed by quobix
parent d4dabca04f
commit b6f5730a7f
10 changed files with 69 additions and 63 deletions

View File

@@ -4,17 +4,18 @@
package reports
import (
"os"
"testing"
"github.com/pb33f/libopenapi"
v3 "github.com/pb33f/libopenapi/datamodel/low/v3"
"github.com/pb33f/libopenapi/what-changed/model"
"github.com/stretchr/testify/assert"
"io/ioutil"
"testing"
)
func createDiff() *model.DocumentChanges {
burgerShopOriginal, _ := ioutil.ReadFile("../../test_specs/burgershop.openapi.yaml")
burgerShopUpdated, _ := ioutil.ReadFile("../../test_specs/burgershop.openapi-modified.yaml")
burgerShopOriginal, _ := os.ReadFile("../../test_specs/burgershop.openapi.yaml")
burgerShopUpdated, _ := os.ReadFile("../../test_specs/burgershop.openapi-modified.yaml")
originalDoc, _ := libopenapi.NewDocument(burgerShopOriginal)
updatedDoc, _ := libopenapi.NewDocument(burgerShopUpdated)
documentChanges, _ := libopenapi.CompareDocuments(originalDoc, updatedDoc)