Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
Deleted unnecessary pointers 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
cn0047 committed Nov 5, 2018
1 parent 3749dc4 commit 691e5b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/go-app/app/vo/GetChartVO/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (i *Instance) initFromGetRequest(r http.Request) {
i.initTimeRange(query.Get(params["timeRange"]), err)

if !err.IsEmpty() {
panic(err)
panic(*err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/go-app/app/vo/ProjectVO/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (i *Instance) initFromMap(data map[string]string) {
i.initSchedule(data, err)

if !err.IsEmpty() {
panic(err)
panic(*err)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/go-app/middleware/panic.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func withPanicAPI(next http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
defer recover.All(func(err interface{}) {
switch err.(type) {
case *InvalidVOError.Instance:
voErr := err.(*InvalidVOError.Instance)
case InvalidVOError.Instance:
voErr := err.(InvalidVOError.Instance)
rest.Error(w, http.StatusBadRequest, voErr.GetErrors())
return
case BLError.Instance:
Expand Down

0 comments on commit 691e5b0

Please sign in to comment.