MCPcopy Index your code
hub / github.com/airplayx/gormat

github.com/airplayx/gormat @0.0.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.0.7 ↗ · + Follow
3,662 symbols 14,959 edges 392 files 1,294 documented · 35%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Gormat - Cross platform gopher tool

The golang convenient converter supports Database to Struct, SQL to Struct, and JSON to Struct.

Go Go Report Card codecov shields 中文说明

image

Features

  • [x] Database to Struct
    • [x] Data engine
      • [x] Mysql
    • [x] Auto save file
    • [x] Tags
      • [x] Gorm
      • [x] Xrom
      • [x] JSON
    • [x] Exclude list
    • [x] Data mapping
    • [x] Custom transformation
  • [x] SQL to Struct
  • [x] JSON to Struct

About

In golang development, there are times when you need to tap the structure manually and store it manually.Although Gorm has the ability to migrate automatically, it does not form database fields effectively and ideally.There are also many open source examples on the web, but there are no user-friendly and easy-to-manage tools, so I started this project with the goal of more efficient development, conversion and ready-to-use.

This project borrows a lot of code from open source conversion libraries and makes some adjustments in conjunction with orm.There are many problems encountered in the development, and Fyne is a GUI development framework with many pits, which should not be further discussed.Whether it is a database to Struct or a SQL to Struct statement, there are still some errors, so the conversion results are only for reference, please adjust the use of the actual project.

Prerequisites

golang 1.11+

Installation

No additional environment is required for installation and use, move to releases to download.

Different platforms need to install additional development environments.

Linux and BSD:

Ubuntu / Debian: sudo apt-get install golang gcc libgl1-mesa-dev xorg-dev
Fedora: sudo dnf install golang gcc libXcursor-devel libXrandr-devel mesa-libGL-devel libXi-devel libXinerama-devel
Solus: sudo eopkg it -c system.devel golang mesalib-devel libxrandr-devel libxcursor-devel libxi-devel libxinerama-devel
Arch Linux: sudo pacman -S go xorg-server-devel

Windows:

Gcc

Usage example

SET CGO_ENABLED=1
SET CC=x86_64-w64-mingw32-gcc
SET GOOS=windows
SET GOARCH=amd64
go build -o gormat.exe -ldflags="-H windowsgui"

In this project, Fyne is used for development. For more steps of packaging and compiling, please refer to https://fyne.io/develop/distribution.html

Thanks

github.com/hsyan2008/gom
github.com/fatih/structtag
github.com/yujiahaol68/sql2struct
github.com/bashtian/jsonutils

License

For the MIT agreement of this project, please click LICENSE for more details.

Extension points exported contracts — how you extend this code

Clipboard (Interface)
Clipboard represents the system clipboard interface [9 implementers]
vendor_/fyne.io/fyne/clipboard.go
Widget (Interface)
Widget defines the standard behaviours of any widget. This extends the CanvasObject - a widget behaves in the same basic [43 …
vendor_/fyne.io/fyne/widget.go
WidgetRenderer (Interface)
WidgetRenderer defines the behaviour of a widget's implementation. This is returned from a widget's declarative object t [8 …
vendor_/fyne.io/fyne/widget.go
CanvasObject (Interface)
CanvasObject describes any graphical object that can be added to a canvas. Objects have a size and position that can be [7 …
vendor_/fyne.io/fyne/canvasobject.go
Tappable (Interface)
Tappable describes any CanvasObject that can also be tapped. This should be implemented by buttons etc that wish to hand [20 …
vendor_/fyne.io/fyne/canvasobject.go

Core symbols most depended-on inside this repo

Size
called by 442
vendor_/fyne.io/fyne/internal/painter/software/draw.go
Padding
called by 423
vendor_/fyne.io/fyne/theme.go
MinSize
called by 321
vendor_/fyne.io/fyne/layout.go
Resize
called by 228
vendor_/fyne.io/fyne/test/testcanvas.go
Capture
called by 223
vendor_/fyne.io/fyne/internal/painter/gl/painter.go
Canvas
called by 201
vendor_/fyne.io/fyne/window.go
Refresh
called by 193
vendor_/fyne.io/fyne/canvas.go
Position
called by 160
vendor_/fyne.io/fyne/canvasobject.go

Shape

Method 1,769
Function 1,493
Struct 309
Interface 53
TypeAlias 38

Languages

Go100%
C1%

Modules by API surface

vendor_/fyne.io/fyne/widget/entry.go81 symbols
vendor_/fyne.io/fyne/theme/icons.go79 symbols
vendor_/fyne.io/fyne/widget/entry_test.go70 symbols
vendor_/fyne.io/fyne/internal/driver/glfw/window.go69 symbols
vendor_/fyne.io/fyne/internal/driver/glfw/window_test.go65 symbols
vendor_/fyne.io/fyne/theme/icons_test.go64 symbols
vendor_/fyne.io/fyne/theme/theme.go59 symbols
vendor_/fyne.io/fyne/widget/scroller.go52 symbols
vendor_/fyne.io/fyne/internal/driver/glfw/canvas.go51 symbols
vendor_/fyne.io/fyne/widget/tabcontainer.go48 symbols
vendor_/fyne.io/fyne/cmd/fyne/internal/mobile/binres/binres.go39 symbols
vendor_/fyne.io/fyne/widget/textgrid.go35 symbols

For agents

$ claude mcp add gormat \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page