删除或撤销Buffalo资源生成。

huangapple go评论71阅读模式
英文:

Delete or undo Buffalo resource generation

问题

我使用以下命令在Buffalo中生成了一个资源:

buffalo g resource <name> <flags>

我意识到在生成资源时犯了一个错误,我该如何:

  • 撤销资源的生成?
  • 移除/销毁资源?

我在Buffalo的文档或buffalo g resource --help消息中没有找到相关信息。

英文:

I have generated a resource in Buffalo using the command:

buffalo g resource &lt;name&gt; &lt;flags&gt;

I have realized I have made a mistake in this resource generation, how do I

  • Undo the generation of the resource?
  • Remove/Destroy the resource?

I do not see this in Buffalo's documentation or the buffalo g resource --help message.

答案1

得分: 4

你可以使用destroy cli,幸运的是有一个destroy resource命令可以帮助你,你可以这样做:

buffalo d resource <name>

它会指导你删除哪些内容,或者你可以传递--yes标志来简单地删除所有相关文件。例如:

buffalo d resource <name> --yes

或者

buffalo d resource <name> -y
英文:

You could use the destroy cli, fortunately there is a destroy resource command to help, you can do something like:

buffalo d resource &lt;name&gt;

And it will guide you on which things to remove, or you could pass the --yes flag to simply remove all associated files. p.e:

buffalo d resource &lt;name&gt; --yes

or

buffalo d resource &lt;name&gt; -y

huangapple
  • 本文由 发表于 2017年6月25日 03:30:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/44740204.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定