github.com/jonsyu1/godel@v0.0.0-20171017211503-64567a0cf169/docs/Tutorial.md (about)

     1  The following tutorial demonstrates how to install, configure and use gödel on an example project. We will be creating a
     2  project called `echgo` that is a simple program that echoes user input in a variety of ways.
     3  
     4  Following every step of the tutorial from beginning to end will show the entire end-to-end process of creating a new
     5  project and using a variety of gödel features to configure it. It is also possible to jump to any section of interest
     6  directly. Each step of the tutorial provides a general summary of the step, the expected preconditions before the step,
     7  the actions to take during the step, and the conditions that should exist after the step.
     8  
     9  The repository at https://github.com/nmiyake/echgo contains the result of walking through the tutorial.
    10  
    11  The tutorial consists of the following steps:
    12  
    13  * [Add gödel to a project](https://github.com/palantir/godel/wiki/Add-g%C3%B6del)
    14  * [Add Git hooks to enforce formatting](https://github.com/palantir/godel/wiki/Add-git-hooks)
    15  * [Generate IDE project for Gogland](https://github.com/palantir/godel/wiki/Generate-IDE-project)
    16  * [Format Go files](https://github.com/palantir/godel/wiki/Format)
    17  * [Run static checks on code](https://github.com/palantir/godel/wiki/Check)
    18  * [Run tests](https://github.com/palantir/godel/wiki/Test)
    19  * [Build](https://github.com/palantir/godel/wiki/Build)
    20  * [Run](https://github.com/palantir/godel/wiki/Run)
    21  * [Dist](https://github.com/palantir/godel/wiki/Dist)
    22  * [Publish](https://github.com/palantir/godel/wiki/Publish)
    23  * [Generate license headers](https://github.com/palantir/godel/wiki/License-headers)
    24  * [Go generate tasks](https://github.com/palantir/godel/wiki/Generate)
    25  * [Define excludes](https://github.com/palantir/godel/wiki/Exclude)
    26  * [Write integration tests](https://github.com/palantir/godel/wiki/Integration-tests)
    27  * [Sync a documentation directory with GitHub wiki](https://github.com/palantir/godel/wiki/GitHub-wiki)
    28  * [Verify project](https://github.com/palantir/godel/wiki/Verify)
    29  * [Set up CI to run tasks](https://github.com/palantir/godel/wiki/CI-setup)
    30  * [Update gödel](https://github.com/palantir/godel/wiki/Update-g%C3%B6del)
    31  * [Other commands](https://github.com/palantir/godel/wiki/Other-commands)
    32  * [Conclusion](https://github.com/palantir/godel/wiki/Tutorial-conclusion)
    33  
    34  This tutorial uses `github.com/nmiyake/echgo` as the project path. Some parts of the tutorial require the ability to
    35  create and push to a repository on GitHub. Although it is possible to push a project with this path to any GitHub
    36  repository, if you want to follow the tutorial in the most realistic manner, create your `echgo` project in a path that
    37  is under a GitHub organization or user that you control: for example, `github.com/<user>/echgo` or
    38  `github-enterprise.domain.com/<org>/echgo`.
    39  
    40  Start the tutorial by creating the directory for your project and setting it to be the working directory:
    41  
    42  ```
    43  ➜ mkdir -p $GOPATH/src/github.com/nmiyake/echgo && cd $_
    44  ➜ pwd
    45  /Volumes/git/go/src/github.com/nmiyake/echgo
    46  ```
    47  
    48  Initialize a git repository, add a README and commit it:
    49  
    50  ```
    51  ➜ git init
    52  ➜ echo '`echgo` is a program that echoes input provided by the user.' > README.md
    53  ➜ git add README.md
    54  ➜ git commit -m "Initial commit"
    55  [master (root-commit) 54a23e6] Initial commit
    56   1 file changed, 1 insertion(+)
    57   create mode 100644 README.md
    58  ```
    59  
    60  Tutorial end state
    61  ------------------
    62  
    63  * `$GOPATH/src/github.com/nmiyake/echgo` exists and is the working directory
    64  
    65  ([Link](https://github.com/nmiyake/echgo/tree/54a23e62a4f9983d60939fdc8ed8dd59f81ddf7c))
    66  
    67  Tutorial next step
    68  ------------------
    69  
    70  [Add gödel](https://github.com/palantir/godel/wiki/Add-g%C3%B6del)