Jenkins Operator – Developer Guide https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/ Recent Hugo news from gohugo.io Hugo -- gohugo.io Mon, 05 Aug 2019 00:00:00 +0000 https://jenkinsci.github.io/kubernetes-operator/img/hugo.png GoHugo.io https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/ Docs: Tools https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/tools/ Mon, 05 Aug 2019 00:00:00 +0000 https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/tools/ <div class="pageinfo pageinfo-primary"> <p>This document explains how to install the Go tools used by the development process.</p> </div> <h2 id="configure-environment-variables">Configure environment variables</h2> <div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#204a87">export</span> <span style="color:#000">GOPATH</span><span style="color:#ce5c00;font-weight:bold">=</span>/home/go <span style="color:#8f5902;font-style:italic"># example value</span> <span style="color:#204a87">export</span> <span style="color:#000">GOROOT</span><span style="color:#ce5c00;font-weight:bold">=</span>/usr/lib/go-1.12 <span style="color:#8f5902;font-style:italic"># example value</span> <span style="color:#204a87">export</span> <span style="color:#000">PATH</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$GOPATH</span>/bin:<span style="color:#000">$PATH</span></code></pre></div> <h2 id="goimports">goimports</h2> <pre><code>go get golang.org/x/tools/cmd/goimports cd $GOPATH/src/golang.org/x/tools/cmd/goimports go build go install </code></pre> <h2 id="golint">golint</h2> <pre><code>go get -u golang.org/x/lint/golint cd $GOPATH/src/golang.org/x/lint/golint go build go install </code></pre> <h2 id="checkmake">checkmake</h2> <pre><code>go get github.com/mrtazz/checkmake cd $GOPATH/src/github.com/mrtazz/checkmake go build go install </code></pre> <h2 id="staticcheck">staticcheck</h2> <pre><code>mkdir -p $GOPATH/src/github.com/dominikh/ cd $GOPATH/src/github.com/dominikh/ git clone https://github.com/dominikh/go-tools.git cd $GOPATH/src/github.com/dominikh/go-tools/staticcheck go build go install </code></pre>