GoAdminGroup / go-admin

Deprecated io/ioutil package usage GO-C4001
Anti-pattern
Minor
a month ago2 years old
ioutil.ReadAll is deprecated, use io.ReadAll instead
 203		_ = res.Body.Close()
 204	}()
 205
 206	body, err := ioutil.ReadAll(res.Body) 207
 208	if err != nil {
 209		return []map[string]interface{}{}, 0
ioutil.ReadFile is deprecated, use os.ReadFile instead
 846
 847// ReadFromYaml read the Config from a YAML file.
 848func ReadFromYaml(path string) Config {
 849	jsonByte, err := ioutil.ReadFile(path) 850
 851	if err != nil {
 852		panic(err)
ioutil.ReadFile is deprecated, use os.ReadFile instead
 827
 828// ReadFromJson read the Config from a JSON file.
 829func ReadFromJson(path string) Config {
 830	jsonByte, err := ioutil.ReadFile(path) 831
 832	if err != nil {
 833		panic(err)
ioutil.ReadAll is deprecated, use io.ReadAll instead
17
18	var p ServerLoginParam
19
20	body, err := ioutil.ReadAll(ctx.Request.Body)21
22	if err != nil {
23		logger.Error("get server login parameter error: ", err)
ioutil.ReadAll is deprecated, use io.ReadAll instead
189	defer func() {
190		_ = res.Body.Close()
191	}()
192	body, err := ioutil.ReadAll(res.Body)193	if err != nil {
194		logger.Error("get online plugins: ", err)
195		return nil, err