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

Commit 691e5b0

Browse files
committed
Deleted unnecessary pointers 3.
1 parent 3749dc4 commit 691e5b0

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/go-app/app/vo/GetChartVO/instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (i *Instance) initFromGetRequest(r http.Request) {
4545
i.initTimeRange(query.Get(params["timeRange"]), err)
4646

4747
if !err.IsEmpty() {
48-
panic(err)
48+
panic(*err)
4949
}
5050
}
5151

src/go-app/app/vo/ProjectVO/instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (i *Instance) initFromMap(data map[string]string) {
4747
i.initSchedule(data, err)
4848

4949
if !err.IsEmpty() {
50-
panic(err)
50+
panic(*err)
5151
}
5252
}
5353

src/go-app/middleware/panic.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ func withPanicAPI(next http.HandlerFunc) http.HandlerFunc {
4141
return func(w http.ResponseWriter, r *http.Request) {
4242
defer recover.All(func(err interface{}) {
4343
switch err.(type) {
44-
case *InvalidVOError.Instance:
45-
voErr := err.(*InvalidVOError.Instance)
44+
case InvalidVOError.Instance:
45+
voErr := err.(InvalidVOError.Instance)
4646
rest.Error(w, http.StatusBadRequest, voErr.GetErrors())
4747
return
4848
case BLError.Instance:

0 commit comments

Comments
 (0)