Tags: go-advanced-admin/admin
Tags
feat(utils): add MinInt function for comparing integers Introduce a utility function MinInt to determine the minimum of two integers. This enhances code readability and reusability by abstracting common logic. Updated admin panel to use MinInt for slicing log entries, improving clarity and maintainability.
chore(go.mod): update dependencies and clean up go.mod file - Downgrade Go version from 1.23.1 to 1.16 for compatibility. - Replace indirect dependencies with a direct one for better clarity. - Add `github.com/google/uuid` for UUID generation. - Remove unnecessary indirect dependencies to simplify dependency management. - Adjust `go.sum` and `go.work.sum` accordingly. These changes aim to streamline the dependency management, ensuring the project uses necessary and up-to-date libraries while maintaining compatibility with older Go versions.
feat: enhance pointer handling in models and forms - Refactored `TestModel4` to use pointer for `Title` to allow nil values. - Improved field reflection in `app.go` to handle pointer types. - Updated form field logic to support pointer values and ensure proper type conversions. - Enhanced instance setting functionality to recognize and handle pointers, improving flexibility and reducing potential errors. - Introduced `IsPointer` flag in `FieldConfig` for better type management and initial value registration. - Improved error handling for type conversion issues, ensuring informative messages and robust operation.
feat(uuid): add support for UUID fields in admin panel forms - Introduced UUIDField to handle UUID data type in form fields. - Implemented parsing and validation for UUID inputs. - Updated conversion utilities to handle UUID conversions. - Allows setting fields as required and validates UUID format. - Enhances form flexibility and data integrity by supporting UUIDs.