Skip to content

Commit

Permalink
Use copier lib fork
Browse files Browse the repository at this point in the history
  • Loading branch information
System-Glitch committed Oct 9, 2023
1 parent 9b4288e commit 5aa1f46
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion database/factory.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package database

import (
"github.com/jinzhu/copier"
"gorm.io/gorm"
"goyave.dev/copier"
"goyave.dev/goyave/v5/util/errors"
)

Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require (
github.com/Code-Hex/uniseg v0.2.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/uuid v1.3.1
github.com/jinzhu/copier v0.4.0
github.com/samber/lo v1.38.1
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.13.0
Expand All @@ -16,6 +15,7 @@ require (
gorm.io/driver/sqlite v1.5.3
gorm.io/driver/sqlserver v1.5.1
gorm.io/gorm v1.25.4
goyave.dev/copier v0.4.1
)

require (
Expand All @@ -36,5 +36,3 @@ require (
golang.org/x/text v0.13.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/jinzhu/copier v0.4.0 => github.com/System-Glitch/copier v0.0.0-20230810143212-ca7f7fa385a2
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0 h1:HCc0+LpPfpC
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/Code-Hex/uniseg v0.2.0 h1:QB/2UJFvEuRLSZqe+Sb1XQBTWjqGVbZoC6oSWzQRKws=
github.com/Code-Hex/uniseg v0.2.0/go.mod h1:/ndS2tP+X1lk2HUOcXWGtVTxVq0lWilwgMa4CbzdRsg=
github.com/System-Glitch/copier v0.0.0-20230810143212-ca7f7fa385a2 h1:qaU97IJo03X1LjJN9e+yRWzqpCoNwYT54SO7BvV7M6A=
github.com/System-Glitch/copier v0.0.0-20230810143212-ca7f7fa385a2/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down Expand Up @@ -166,3 +164,5 @@ gorm.io/driver/sqlserver v1.5.1/go.mod h1:AYHzzte2msKTmYBYsSIq8ZUsznLJwBdkB2wpI+
gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gorm.io/gorm v1.25.4 h1:iyNd8fNAe8W9dvtlgeRI5zSVZPsq3OpcTu37cYcpCmw=
gorm.io/gorm v1.25.4/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
goyave.dev/copier v0.4.1 h1:wTBQ+PF5WvcOejG/C5I0cmSWG4hf+hw9KQLIhyGhF5k=
goyave.dev/copier v0.4.1/go.mod h1:WJu0Ex81v29f5U0eMWzSNsMTGmuGY6lQ/q5yGlyLDsU=
2 changes: 1 addition & 1 deletion slog/slog.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type unwrapper interface {
// functions so they take an error as parameter and handle `*errors.Error` gracefully.
type Logger struct {
*slog.Logger
// TODO split outputs: errors to stderr, rest to stdout
// TODO split outputs: level >= warning prints to stderr, rest to stdout, make it configurable
}

// New creates a new Logger with the given non-nil Handler and a nil context.
Expand Down
2 changes: 1 addition & 1 deletion util/typeutil/typeutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"

"github.com/jinzhu/copier"
"goyave.dev/copier"
"goyave.dev/goyave/v5/util/errors"
)

Expand Down
1 change: 1 addition & 0 deletions util/typeutil/typeutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ func TestCopy(t *testing.T) {
Ptr: nil,
},
},
// TODO copy undefined to undefined (copier.Valuer interface problem). Undefined should probably implement Scan
}

for _, c := range cases {
Expand Down
2 changes: 1 addition & 1 deletion util/typeutil/undefined.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/json"
"fmt"

"github.com/jinzhu/copier"
"goyave.dev/copier"
"goyave.dev/goyave/v5/util/errors"
)

Expand Down

0 comments on commit 5aa1f46

Please sign in to comment.