A tool to generate mysql fields to golang struct with many tags

817 阅读1分钟

More Info: github.com/hantmac/fuc…

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
  • 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.

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

player.youku.com/embed/XNDQ3…