Installation
To create a new Goffee project you need to install goffee first which is the cli tool
Install Goffee cli
Set up your GOPATH
If you have not created a GOPATH as part of the installation, do so now. The GOPATH
is a directory where all of your Go code will live. Here is one way of setting it up:
- Make a directory:
mkdir ~/goffee - Tell Go to use that as your GOPATH:
export GOPATH=~/goffee - Save your GOPATH so that it will apply to all future shell sessions:
echo export GOPATH=$GOPATH >> ~/.bash_profile
Note that depending on your shell, you may need to adjust to write the export into a different configuration file (e.g. ~/.bashrc, *~/.zshrc, etc.).
Get the Goffee command line tool
To install the goffee globally open up your terminal and run the following command:
go install git.smarteching.com/goffee/goffee@latest
Ensure the $GOPATH/bin directory is in your PATH so that you can reference the command from anywhere.
export PATH="$PATH:$GOPATH/bin"
Create a new project:
The command for creating a new project is the following:
goffee new [project-name] [project-remote-repository]
Example
goffee new myapp git.smarteching.com/goffee/myapp
where:
project-name is the name of your project
remote-repository is the remote repository that will host the project.