mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-08 20:47:43 +00:00
chore: replace use of deprecated ioutil with os
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user