Skip to content

Commit

Permalink
Merge pull request #22 from vearne/feat/shadow
Browse files Browse the repository at this point in the history
update internal/resource/resource.go
  • Loading branch information
vearne authored Oct 22, 2024
2 parents c5a1dba + 7a1d8c0 commit b006798
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func ParseConfigFile(filePath string) error {
for idx, f := range GlobalConfig.HttpRuleFiles {
slog.Info("parse http rule file:%v", f)

b, err := readFile(f)
b, err = readFile(f)
if err != nil {
slog.Error("readFile:%v, error:%v", f, err)
return err
Expand All @@ -95,7 +95,7 @@ func ParseConfigFile(filePath string) error {
c.Request.Body = strings.ReplaceAll(c.Request.Body, "\n", "")
c.VerifyRules = make([]rule.VerifyRule, 0)
for _, r := range c.OriginRules {
b, _ := json.Marshal(r)
b, _ = json.Marshal(r)
switch r["name"] {
case "HttpStatusEqualRule":
var item rule.HttpStatusEqualRule
Expand Down Expand Up @@ -152,7 +152,7 @@ func ParseConfigFile(filePath string) error {
for idx, f := range GlobalConfig.GrpcRuleFiles {
slog.Info("parse grpc rule:%v", f)

b, err := readFile(f)
b, err = readFile(f)
if err != nil {
slog.Error("readFile:%v, error:%v", f, err)
return err
Expand Down

0 comments on commit b006798

Please sign in to comment.