web tool -自动将SQL字段转为golang struct

时间:2024-04-09 19:09:40

More Info: https://github.com/hantmac/fuckdb

fuckdb

fuckdb helps you fuck the db when you write go struct.
fuckdb generates a go compatible struct type with the required column names, data types, and annotations just fill in the database information in the web UI. Making go web develop very easy by saving a lot of time writing structure.fuckdbis based/inspired by the work of Seth Shelnutt’s db2struct, and Db2Struct is based/inspired by the work of ChimeraCoder’s gojson package gojson.

Web UI

  • Easy to use
    Only a few clicks on the web UI can generate the corresponding golang struct with ORM or json or xm … tags.

How to use?

Docker deploy

  • docker-compose up -d
  • Use localhost:8081 you will get the next page
    web tool -自动将SQL字段转为golang struct
  • Just Put your mariaDB/mysql info into it and you will get your golang code.
  • Click generate.
  • Boom!Enjoy your coffee and copy your struct code.
    web tool -自动将SQL字段转为golang struct

Source code deploy

  • git clone the source code
  • cd fuckdb/
  • go run main.go
  • cd frontend && npm run dev/start
  • Use localhost:8081 you will get the web UI
  • The same operation with docker deployment.

video show