Skip to content

Commit f80fe49

Browse files
committed
fix: correct lint issues
1 parent 0c76940 commit f80fe49

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ linters:
1010
- tagliatelle
1111
- depguard
1212
- revive
13+
- ireturn

internal/http/handler/home.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ func (h Home) New(c echo.Context) error {
8181

8282
return echo.NewHTTPError(http.StatusBadRequest, err.Error())
8383
}
84-
defer fd.Close()
84+
85+
defer func() {
86+
_ = fd.Close()
87+
}()
8588

8689
data, err := io.ReadAll(fd)
8790
if err != nil {

internal/http/opa/opa.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ type OPA struct {
1616
}
1717

1818
func New() (OPA, error) {
19-
eng, err := sdk.New(context.Background(), sdk.Options{
20-
19+
eng, err := sdk.New(context.Background(), sdk.Options{ // nolint: exhaustruct
2120
})
2221
if err != nil {
2322
return OPA{

0 commit comments

Comments
 (0)