abandonCodeService

command
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 6 Imported by: 0

README

CURD服务生成模板

abandon的取名只是为了排序靠前,并且表示非业务有效代码。

同时作为字典第一个单词,比较有趣而已。

主要作用是作为 tools/genCURD生成代码时的模板

该工具将读取本目录的代码,通过替换表名的方法,生成基础的CURD代码

Q:为什么不是采用类似 html/template等模板文件填入变量的方式?

A:因为模板文件的编写无法得到代码提示/编译错误等,而abandonCodeService的编写过程和常规服务的体验完全一致。

Q:为什么不是采用AST抽象语法树来解析代码

A:太复杂,普通的CURD代码仅仅需要改变的只有表名,大家都经历过“建表-拷贝-粘贴-改表名/字段名”这种无聊的重复工作。

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL