🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

github.com/one-hole/gonrails-cli

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
g

github.com/one-hole/gonrails-cli

v0.0.0-20190710025842-e2debaa4848c
Version published
Created
Issues
0

gonrails-cli is command line tools for project gonrails

1. Install

go get -u github.com/one-hole/gonrails-cli

2. New

gonrails-cli new yourproject-name

  • so if I want to create a project named kalista , I just run command gonrails-cli new kalista
  • the docs of the created project was in here

3. Generate

3.1

The command is gonrails-cli generate controller yourcontroller action list

eg:

  • gonrails-cli generate controller users index update show
  • gonrails-cli generate controller admin/users index update show
3.2

N. Others

gonrails-cli new yourproject-name

1. 生成相应的项目(目录和文件)
2. 生成 Go Mod 文件
3. 执行 `go mod tidy`

gonrails-cli help [command]

gonrails-cli generate model your-model-name

gonrails-cli generate controller your-controller-name action list

gonrails-cli generate help

  • useage .
  • help for each command (useage for each cmd)
  • colorful output
  • shorcut

目前已经可以使用的功能:

  • gonrails-cli new

一些其他的思考:

  • 如何把 Gonrails 项目里面的部分东西组件化抽象,这样就可以避免生成新的琐碎的代码****
  • 如何使用大仓库整合 Gonrailsgonrails-cli 两个项目

FAQs

Package last updated on 10 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts