Installation
To install the GoHT CLI tool, use the following command:
This will install the goht command into your $GOPATH/bin directory. If you don’t have a $GOPATH set, the command will be installed into your $HOME/go/bin directory.
To verify the CLI installation, run the following command:
If you see the version number of the installed GoHT CLI tool, then you’re good to go!
If you don’t see the version number, then you may need to add the directory where the goht command was installed to your $PATH.
Library Dependency
The CLI install command is different from the library dependency command. Applications that import the GoHT runtime library should add the module to their project with:
Most applications use the CLI to generate Go files from .goht templates, then compile those generated files with the rest of the application.
Linux and macOS Users
You can do this by adding the following line to your shell’s configuration file (e.g. ~/.bashrc, ~/.zshrc, etc.):
Windows Users
You can do this by modifying the Path environment variable in the system settings to include the directory where the goht command was installed.
Add this to the Path Environment Variable: