Skip to content
Snippets Groups Projects
Commit c0ddc26d authored by Bob Callaway's avatar Bob Callaway
Browse files

fix lint error

parent 182adc3f
No related branches found
No related tags found
No related merge requests found
...@@ -61,9 +61,9 @@ func handleRekorAPIError(params interface{}, code int, err error, message string ...@@ -61,9 +61,9 @@ func handleRekorAPIError(params interface{}, code int, err error, message string
} }
} }
switch params.(type) { switch params := params.(type) {
case entries.GetLogEntryByIndexParams: case entries.GetLogEntryByIndexParams:
logMsg(params.(entries.GetLogEntryByIndexParams).HTTPRequest) logMsg(params.HTTPRequest)
switch code { switch code {
case http.StatusNotFound: case http.StatusNotFound:
return entries.NewGetLogEntryByIndexNotFound() return entries.NewGetLogEntryByIndexNotFound()
...@@ -71,7 +71,7 @@ func handleRekorAPIError(params interface{}, code int, err error, message string ...@@ -71,7 +71,7 @@ func handleRekorAPIError(params interface{}, code int, err error, message string
return entries.NewGetLogEntryByIndexDefault(code).WithPayload(errorMsg(message, code)) return entries.NewGetLogEntryByIndexDefault(code).WithPayload(errorMsg(message, code))
} }
case entries.GetLogEntryByUUIDParams: case entries.GetLogEntryByUUIDParams:
logMsg(params.(entries.GetLogEntryByUUIDParams).HTTPRequest) logMsg(params.HTTPRequest)
switch code { switch code {
case http.StatusNotFound: case http.StatusNotFound:
return entries.NewGetLogEntryByUUIDNotFound() return entries.NewGetLogEntryByUUIDNotFound()
...@@ -79,7 +79,7 @@ func handleRekorAPIError(params interface{}, code int, err error, message string ...@@ -79,7 +79,7 @@ func handleRekorAPIError(params interface{}, code int, err error, message string
return entries.NewGetLogEntryByUUIDDefault(code).WithPayload(errorMsg(message, code)) return entries.NewGetLogEntryByUUIDDefault(code).WithPayload(errorMsg(message, code))
} }
case entries.GetLogEntryProofParams: case entries.GetLogEntryProofParams:
logMsg(params.(entries.GetLogEntryProofParams).HTTPRequest) logMsg(params.HTTPRequest)
switch code { switch code {
case http.StatusNotFound: case http.StatusNotFound:
return entries.NewGetLogEntryProofNotFound() return entries.NewGetLogEntryProofNotFound()
...@@ -87,7 +87,7 @@ func handleRekorAPIError(params interface{}, code int, err error, message string ...@@ -87,7 +87,7 @@ func handleRekorAPIError(params interface{}, code int, err error, message string
return entries.NewGetLogEntryProofDefault(code).WithPayload(errorMsg(message, code)) return entries.NewGetLogEntryProofDefault(code).WithPayload(errorMsg(message, code))
} }
case entries.CreateLogEntryParams: case entries.CreateLogEntryParams:
logMsg(params.(entries.CreateLogEntryParams).HTTPRequest) logMsg(params.HTTPRequest)
switch code { switch code {
case http.StatusBadRequest: case http.StatusBadRequest:
return entries.NewCreateLogEntryBadRequest() return entries.NewCreateLogEntryBadRequest()
...@@ -97,7 +97,7 @@ func handleRekorAPIError(params interface{}, code int, err error, message string ...@@ -97,7 +97,7 @@ func handleRekorAPIError(params interface{}, code int, err error, message string
return entries.NewCreateLogEntryDefault(code).WithPayload(errorMsg(message, code)) return entries.NewCreateLogEntryDefault(code).WithPayload(errorMsg(message, code))
} }
case entries.SearchLogQueryParams: case entries.SearchLogQueryParams:
logMsg(params.(entries.SearchLogQueryParams).HTTPRequest) logMsg(params.HTTPRequest)
switch code { switch code {
case http.StatusBadRequest: case http.StatusBadRequest:
return entries.NewSearchLogQueryBadRequest() return entries.NewSearchLogQueryBadRequest()
...@@ -105,10 +105,10 @@ func handleRekorAPIError(params interface{}, code int, err error, message string ...@@ -105,10 +105,10 @@ func handleRekorAPIError(params interface{}, code int, err error, message string
return entries.NewSearchLogQueryDefault(code).WithPayload(errorMsg(message, code)) return entries.NewSearchLogQueryDefault(code).WithPayload(errorMsg(message, code))
} }
case tlog.GetLogInfoParams: case tlog.GetLogInfoParams:
logMsg(params.(tlog.GetLogInfoParams).HTTPRequest) logMsg(params.HTTPRequest)
return tlog.NewGetLogInfoDefault(code).WithPayload(errorMsg(message, code)) return tlog.NewGetLogInfoDefault(code).WithPayload(errorMsg(message, code))
case tlog.GetLogProofParams: case tlog.GetLogProofParams:
logMsg(params.(tlog.GetLogProofParams).HTTPRequest) logMsg(params.HTTPRequest)
switch code { switch code {
case http.StatusBadRequest: case http.StatusBadRequest:
return tlog.NewGetLogProofBadRequest() return tlog.NewGetLogProofBadRequest()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment