1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-22 04:17:03 +00:00

update dependencies

This commit is contained in:
Gerasimos (Makis) Maropoulos
2025-08-15 23:29:20 +03:00
parent de4f462198
commit a8a3afea22
186 changed files with 694 additions and 689 deletions

View File

@@ -150,7 +150,7 @@ func main() {
var body patchParam
ctx.ReadJSON(&body)
app.Logger().Println(body)
if err := tx.Model(&user).Updates(map[string]interface{}{"username": body.Data.UserName, "password": body.Data.Password}).Error; err != nil {
if err := tx.Model(&user).Updates(map[string]any{"username": body.Data.UserName, "password": body.Data.Password}).Error; err != nil {
app.Logger().Fatalf("update record failed")
tx.Rollback()
ctx.JSON(iris.Map{

View File

@@ -1,6 +1,6 @@
module myapp
go 1.24.3
go 1.25
require (
github.com/kataras/golog v0.1.13

View File

@@ -12,7 +12,7 @@ import (
type personTableType struct {
s parse.StructInfo
z []interface{}
z []any
}
// Schema returns a schema name in SQL database ("").
@@ -63,9 +63,9 @@ func (s Person) String() string {
}
// Values returns a slice of struct or record field values.
// Returned interface{} values are never untyped nils.
func (s *Person) Values() []interface{} {
return []interface{}{
// Returned any values are never untyped nils.
func (s *Person) Values() []any {
return []any{
s.ID,
s.Name,
s.Email,
@@ -75,9 +75,9 @@ func (s *Person) Values() []interface{} {
}
// Pointers returns a slice of pointers to struct or record fields.
// Returned interface{} values are never untyped nils.
func (s *Person) Pointers() []interface{} {
return []interface{}{
// Returned any values are never untyped nils.
func (s *Person) Pointers() []any {
return []any{
&s.ID,
&s.Name,
&s.Email,
@@ -97,14 +97,14 @@ func (s *Person) Table() reform.Table {
}
// PKValue returns a value of primary key for that record.
// Returned interface{} value is never untyped nil.
func (s *Person) PKValue() interface{} {
// Returned any value is never untyped nil.
func (s *Person) PKValue() any {
return s.ID
}
// PKPointer returns a pointer to primary key field for that record.
// Returned interface{} value is never untyped nil.
func (s *Person) PKPointer() interface{} {
// Returned any value is never untyped nil.
func (s *Person) PKPointer() any {
return &s.ID
}
@@ -114,7 +114,7 @@ func (s *Person) HasPK() bool {
}
// SetPK sets record primary key.
func (s *Person) SetPK(pk interface{}) {
func (s *Person) SetPK(pk any) {
if i64, ok := pk.(int64); ok {
s.ID = int32(i64)
} else {

View File

@@ -51,7 +51,7 @@ func main() {
app.Get("/insert", func(ctx iris.Context) {
res, err := db.NamedExec(`INSERT INTO person (first_name,last_name,email) VALUES (:first,:last,:email)`,
map[string]interface{}{
map[string]any{
"first": "John",
"last": "Doe",
"email": "johndoe@example.com",