Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config
import (
"encoding/xml"
"errors"
"io/ioutil"
"os"

"github.com/devfeel/dotweb/core"
"github.com/devfeel/dotweb/framework/file"
Expand Down Expand Up @@ -265,7 +265,7 @@ func dealConfigDefaultSet(c *Config) {
}

func initConfig(configFile string, ctType string, parser func([]byte, interface{}) error) (*Config, error) {
content, err := ioutil.ReadFile(configFile)
content, err := os.ReadFile(configFile)
if err != nil {
return nil, errors.New("DotWeb:Config:initConfig current cType:" + ctType + " config file [" + configFile + "] cannot be parsed - " + err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions config/configset.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config
import (
"encoding/xml"
"errors"
"io/ioutil"
"os"

"github.com/devfeel/dotweb/core"
)
Expand Down Expand Up @@ -39,7 +39,7 @@ func ParseConfigSetYaml(configFile string) (core.ConcurrenceMap, error) {
}

func parseConfigSetFile(configFile string, confType string) (core.ConcurrenceMap, error) {
content, err := ioutil.ReadFile(configFile)
content, err := os.ReadFile(configFile)
if err != nil {
return nil, errors.New("DotWeb:Config:parseConfigSetFile 配置文件[" + configFile + ", " + confType + "]无法解析 - " + err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions request.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dotweb

import (
"io/ioutil"
"io"
"net"
"net/http"
"net/url"
Expand Down Expand Up @@ -162,7 +162,7 @@ func (req *Request) PostBody() []byte {
break
}
}
bts, err := ioutil.ReadAll(req.Body)
bts, err := io.ReadAll(req.Body)
if err != nil {
//if err, panic it
panic(err)
Expand Down
Loading