This repository contains templates for creating new Go projects with gonew
command.
Install gonew
:
go install golang.org/x/tools/cmd/gonew@latest
Create a new project: gonew <template> <new-package>
cd ~/Projects/username
gonew github.com/chuhlomin/gonew/server github.com/username/new-server
gonew github.com/chuhlomin/gonew/library github.com/username/new-library
gonew github.com/chuhlomin/gonew/action github.com/username/new-action
Or you may use new
script:
cd ~/Projects/username
new server new-server
new library new-library
new action new-action