Git Product home page Git Product logo

gormat's Introduction

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

  • Database to Struct
    • Data engine
      • Mysql
    • Auto save file
    • Tags
      • Gorm
      • Xrom
      • JSON
    • Exclude list
    • Data mapping
    • Custom transformation
  • SQL to Struct
  • 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.

gormat's People

Contributors

airplayx avatar doulamon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.