zhangwenjian f6bd306d6d fix🐛: send datetime fields as RFC3339, not space-separated local time
Both date-pickers -- the search filter and the insert/edit form -- used
value-format="YYYY-MM-DD HH:mm:ss", which formats a picked instant as
e.g. "2026-09-19 12:30:00": no T separator, no offset. dto.go.template
declares every datetime column's InsertReq/UpdateReq field as
time.Time with a plain `json:"..."` tag (R6 leaves that file alone, so
there is no time_format tag to reach for instead), and encoding/json's
default (Un)MarshalJSON for time.Time only accepts RFC3339. The
generated form would submit new and edited datetime values in a shape
Go's JSON decoder cannot parse -- a runtime failure on every create and
update, with nothing in `pnpm type-check` or `pnpm lint` positioned to
see it: both check the request is well-typed TypeScript, not that the
string it produces is a string Go can read.

Changed both to value-format="YYYY-MM-DDTHH:mm:ssZ" -- dayjs's Z token
renders the picker's own local offset, which is what a zero-nanosecond
time.Time (anything without a database column storing sub-second
precision) round-trips to on either side of the wire; confirmed
separately against Go's actual json.Marshal/Unmarshal, not assumed from
the RFC.

The search filter needed the same fix, not just the form: GetPageReq
binds a `time.Time` query field via `form:"..."` (dto.go.template),
and gin's own default for an untagged time.Time binding is also
RFC3339 -- the same failure mode on the query side, one call the
report didn't name but the same root cause reaches.

This is a runtime behaviour change no compiler catches, so it was
verified as one: a Go program exercising encoding/json directly (not
assumed from reading the RFC) confirmed a zero-nanosecond time.Time
marshals to plain RFC3339 with no fractional seconds, and unmarshals
correctly from both a numeric offset and a literal Z. Separately, a
Node script loaded go-admin-ui's own installed dayjs 1.11.21 with the
customParseFormat plugin -- the same plugin element-plus's date-picker
extends dayjs with -- and called the same parseDate path date-picker
panel.mjs uses (time-picker/src/utils.ts, no strict flag passed, so
lenient parsing): formatting with this value-format produced a valid
submission string, and parsing either an offset or a literal-Z string
back with the same format produced a valid, correctly-valued date --
covering create, edit prefill, and update in the two directions that
matter (browser to Go, Go to browser) without needing a live backend.
2026-09-19 20:50:13 +08:00
2026-09-18 22:57:17 +08:00
2026-09-18 18:55:19 +08:00
2020-03-13 18:56:00 +08:00
2026-09-08 18:35:13 +08:00
2026-09-08 18:35:13 +08:00
2026-08-08 13:55:08 +08:00
2026-09-18 22:57:17 +08:00
2020-07-02 18:23:14 +08:00
2022-11-03 14:55:02 +08:00
2022-08-14 23:32:58 +08:00

go-admin

Build Status Release License

English | 简体中文 | 繁體中文 | 日本語

The front-end and back-end separation authority management system based on Gin + Vue + Element UI OR Arco Design OR Ant Design is extremely simple to initialize the system. You only need to modify the database connection in the configuration file. The system supports multi-instruction operations. Migration instructions can make it easier to initialize database information. Service instructions It's easy to start the api service.

documentation

Front-end project

Video tutorial

🎬 Online Demo

Element Plus vue3 demohttps://vue.go-admin.pro

Account / Password: admin / 123456

antd demo (go-admin-pro)https://antd.go-admin.pro

Account / Password: admin / 123456

Feature

  • Follow RESTful API design specifications

  • Based on the GIN WEB API framework, it provides rich middleware support (user authentication, cross-domain, access log, tracking ID, etc.)

  • RBAC access control model based on Casbin

  • JWT authentication

  • Support Swagger documents (based on swaggo)

  • Database storage based on GORM, which can expand multiple types of databases

  • Simple model mapping of configuration files to quickly get the desired configuration

  • Code generation tool

  • Form builder

  • Multi-command mode

  • TODO: unit test

🎁 Internal

  1. User management: The user is the system operator, this function mainly completes the system user configuration.
  2. Department management: configure the system organization (company, department, group), and display the tree structure to support data permissions.
  3. Position management: configure the positions of system users.
  4. Menu management: configure the system menu, operation authority, button authority identification, interface authority, etc.
  5. Role management: Role menu permission assignment and role setting are divided into data scope permissions by organization.
  6. Dictionary management: Maintain some relatively fixed data frequently used in the system.
  7. Parameter management: dynamically configure common parameters for the system.
  8. Operation log: system normal operation log record and query; system abnormal information log record and query.
  9. Login log: The system login log record query contains login exceptions.
  10. Interface documentation: Automatically generate related api interface documents according to the business code.
  11. Code generation: According to the data table structure, generate the corresponding addition, deletion, modification, and check corresponding business, and the whole process of visual operation, so that the basic business can be implemented with zero code.
  12. Form construction: Customize the page style, drag and drop to realize the page layout.
  13. Service monitoring: View the basic information of some servers.
  14. Content management: demo function, including classification management and content management. You can refer to the easy to use quick start.

Ready to work

You need to install locally [go] [gin] nodegit

At the same time, a series of tutorials including videos and documents are provided. How to complete the downloading to the proficient use, it is strongly recommended that you read these tutorials before you practice this project! ! !

Easily implement go-admin to write the first application-documentation tutorial

Step 1 - basic content introduction

Step 2 - Practical application - writing database operations

Teach you from getting started to giving up-video tutorial

How to start go-admin

Easily implement business using build tools

v1.1.0 version code generation tool-free your hands [Advanced]

Explanation of multi-command startup mode and IDE configuration

Configuration instructions for go-admin menu [Must see]

How to configure menu information and interface information [Must see]

go-admin permission configuration instructions [Must see]

Instructions for use of go-admin data permissions [Must see]

If you have any questions, please read the above-mentioned usage documents and articles first. If you are not satisfied, welcome to issue and pr. Video tutorials and documents are being updated continuously.

📦 Local development

Environmental requirements

go 1.26.5

nodejs: v22+ (v24 LTS recommended)

package manager: pnpm v9+ (the UI project uses pnpm)

Development directory creation


# Create a development directory
mkdir goadmin
cd goadmin

Get the code

Important note: the two projects must be placed in the same folder;

# Get backend code
git clone https://github.com/go-admin-team/go-admin.git

# Get the front-end code
git clone https://github.com/go-admin-team/go-admin-ui.git

Startup instructions

Server startup instructions

# Enter the go-admin backend project
cd ./go-admin

# Update dependencies
go mod tidy

# Compile the project
go build

# Change setting 
# File path go-admin/config/settings.yml
vi ./config/settings.yml

# 1. Modify the database information in the configuration file
# Note: The corresponding configuration data under settings.database
# 2. Confirm the log path

⚠️ Note that this problem will occur if CGO is not installed in the windows10+ environment;

E:\go-admin>go build
# github.com/mattn/go-sqlite3
cgo: exec /missing-cc: exec: "/missing-cc": file does not exist

or

D:\Code\go-admin>go build
# github.com/mattn/go-sqlite3
cgo: exec gcc: exec: "gcc": executable file not found in %PATH%

Solve the cgo problem and enter

Initialize the database, and start the service

# The first configuration needs to initialize the database resource information
# Use under macOS or linux
$ ./go-admin migrate -c config/settings.dev.yml

# ⚠️Note: Use under windows
$ go-admin.exe migrate -c config/settings.dev.yml

# Start the project, you can also use the IDE for debugging
# Use under macOS or linux
$ ./go-admin server -c config/settings.yml

# ⚠️Note: Use under windows
$ go-admin.exe server -c config/settings.yml

Use docker to compile and start

# Compile the image
docker build -t go-admin .


# Start the container, the first go-admin is the container name, and the second go-admin is the image name
# -v Mapping configuration file Local path: container path
docker run --name go-admin -p 8000:8000 -v /config/settings.yml:/config/settings.yml -d go-admin-server

Generation Document

go generate

Cross compile

# windows
env GOOS=windows GOARCH=amd64 go build main.go

# or
# linux
env GOOS=linux GOARCH=amd64 go build main.go

UI interactive terminal startup instructions

# Install pnpm if you don't have it
npm install -g pnpm

# Installation dependencies
pnpm install

# Start service
pnpm dev

📨 Interactive

wenjianzhang
Wechat Wechat公众号🔥🔥🔥 go-admin技术交流乙号 bilibili🔥🔥🔥

💎 Contributors

JetBrains open source certificate support

The go-admin project has always been developed in the GoLand integrated development environment under JetBrains, based on the free JetBrains Open Source license(s) genuine free license. I would like to express my gratitude.

🤝 Thanks

  1. ant-design
  2. ant-design-pro
  3. arco-design
  4. arco-design-pro
  5. gin
  6. casbin
  7. spf13/viper
  8. gorm
  9. gin-swagger
  10. golang-jwt
  11. vue-element-admin
  12. ruoyi-vue
  13. form-generator

🤟 Sponsor Us

If you think this project helped you, you can buy a glass of juice for the author to show encouragement 🍹

🔑 License

MIT

Copyright (c) 2026 wenjianzhang

S
Description
基于Gin + Vue + Element UI OR Arco Design OR Ant Design的前后端分离权限管理系统
Readme
50 MiB
Languages
Go 99.1%
HTML 0.4%
Makefile 0.3%
Dockerfile 0.1%