mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
chore: replace use of deprecated ioutil with os
This commit is contained in:
@@ -5,7 +5,7 @@ package datamodel
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/pb33f/libopenapi/utils"
|
||||
@@ -290,7 +290,7 @@ func TestExtractSpecInfo_BadVersion_AsyncAPI(t *testing.T) {
|
||||
func ExampleExtractSpecInfo() {
|
||||
|
||||
// load bytes from openapi spec file.
|
||||
bytes, _ := ioutil.ReadFile("../test_specs/petstorev3.json")
|
||||
bytes, _ := os.ReadFile("../test_specs/petstorev3.json")
|
||||
|
||||
// create a new *SpecInfo instance from loaded bytes
|
||||
specInfo, err := ExtractSpecInfo(bytes)
|
||||
|
||||
Reference in New Issue
Block a user