-
Notifications
You must be signed in to change notification settings - Fork 34
Tutorial
The following tutorial demonstrates how to install, configure and use gödel on an example project. We will be creating a
project called echgo
that is a simple program that echoes user input in a variety of ways.
Following every step of the tutorial from beginning to end will show the entire end-to-end process of creating a new project and using a variety of gödel features to configure it. It is also possible to jump to any section of interest directly. Each step of the tutorial provides a general summary of the step, the expected preconditions before the step, the actions to take during the step, and the conditions that should exist after the step.
The repository at https://github.com/nmiyake/echgo contains the result of walking through the tutorial.
The tutorial consists of the following steps:
- Add gödel to a project
- Add Git hooks to enforce formatting
- Generate IDE project for Gogland
- Format Go files
- Run static checks on code
- Run tests
- Build
- Run
- Dist
- Publish
- Generate license headers
- Go generate tasks
- Define excludes
- Write integration tests
- Sync a documentation directory with GitHub wiki
- Verify project
- Set up CI to run tasks
- Update gödel
- Other commands
- Conclusion
This tutorial uses github.com/nmiyake/echgo
as the project path. Some parts of the tutorial require the ability to
create and push to a repository on GitHub. Although it is possible to push a project with this path to any GitHub
repository, if you want to follow the tutorial in the most realistic manner, create your echgo
project in a path that
is under a GitHub organization or user that you control: for example, github.com/<user>/echgo
or
github-enterprise.domain.com/<org>/echgo
.
Start the tutorial by creating the directory for your project and setting it to be the working directory:
➜ mkdir -p $GOPATH/src/github.com/nmiyake/echgo && cd $_
➜ pwd
/Volumes/git/go/src/github.com/nmiyake/echgo
Initialize a git repository, add a README and commit it:
➜ git init
➜ echo '`echgo` is a program that echoes input provided by the user.' > README.md
➜ git add README.md
➜ git commit -m "Initial commit"
[master (root-commit) 54a23e6] Initial commit
1 file changed, 1 insertion(+)
create mode 100644 README.md
-
$GOPATH/src/github.com/nmiyake/echgo
exists and is the working directory
(Link)
- Home
-
Tutorial
- Add gödel to a project
- Add Git hooks to enforce formatting
- Generate IDE project for GoLand
- Format Go files
- Run static checks on code
- Run tests
- Build
- Run
- Dist
- Publish
- Build and push Docker images
- Generate license headers
- Go generate tasks
- Define excludes
- Write integration tests
- Sync a documentation directory with GitHub wiki
- Verify project
- Set up CI to run tasks
- Update gödel
- Update legacy gödel
- Other commands
- Conclusion
- Name
- Philosophy
- Architecture
- Plugins
- Configuration