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

@@ -5,8 +5,9 @@ package v3
import (
"fmt"
"os"
"github.com/pb33f/libopenapi/datamodel"
"io/ioutil"
)
// How to create a low-level OpenAPI 3+ Document from an OpenAPI specification
@@ -14,7 +15,7 @@ func Example_createLowLevelOpenAPIDocument() {
// How to create a low-level OpenAPI 3 Document
// load petstore into bytes
petstoreBytes, _ := ioutil.ReadFile("../../../test_specs/petstorev3.json")
petstoreBytes, _ := os.ReadFile("../../../test_specs/petstorev3.json")
// read in specification
info, _ := datamodel.ExtractSpecInfo(petstoreBytes)