Go 分享我设计的 Go 语言 API 框架:Airway

daqing · September 16, 2023 · Last by daqing replied at September 22, 2023 · 958 hits

先上地址:https://github.com/daqing/airway


思路主要是受 Ruby on Rails 框架启发,你可以发现,目录结构都是非常相似的。

这个项目的代码,是从我近期开发的后端代码提取出来的。

求 star ~~~

go 不适合搞这一套

你的 controller 是不是所有请求共用的?rails 的 controller 应该是每个请求单独创建的。

Reply to snowlyg

为啥不适合呢?

Reply to FrankFang

请求的处理,不是 Controller,而是 Action。

5 Floor has deleted
Reply to daqing

我也这么搞过,感觉怪怪的

更新:使用 pg 连接池。

You need to Sign in before reply, if you don't have an account, please Sign up first.