Repository: knative-sandbox/kn-plugin-func
Pull request #509 (2021-09-03 11:40:33)

[main] Update actions
Cron -knative-prow-robot

/cc knative-sandbox/kn-plugin-func-approvers
/assign knative-sandbox/kn-plugin-func-approvers

Produced by: knative-sandbox/knobots/actions/update-actions

Details:
```

```

knative-prow-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative-sandbox/kn-plugin-func/pull/509#" title="Author self-approved">knative-automation</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **lance** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @lance` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative-sandbox%2Fkn-plugin-func).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/knative-sandbox/kn-plugin-func/blob/main/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["lance"]} -->

Patch:
diff --git a/.github/workflows/knative-boilerplate.yaml b/.github/workflows/knative-boilerplate.yaml
new file mode 100644
index 00000000..f901369f
--- /dev/null
+++ b/.github/workflows/knative-boilerplate.yaml
@@ -0,0 +1,96 @@
+# Copyright 2020 The Knative Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is automagically synced here from github.com/knative-sandbox/.github
+# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
+
+name: Boilerplate
+
+on:
+  pull_request:
+    branches: [ 'main', 'master', 'release-*', 'mkdocs' ]
+
+jobs:
+
+  check:
+    name: Boilerplate Check
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false # Keep running if one leg fails.
+      matrix:
+        extension:
+        - go
+        - sh
+
+        # Map between extension and human-readable name.
+        include:
+        - extension: go
+          language: Go
+        - extension: sh
+          language: Bash
+
+    steps:
+
+      - name: Set up Go 1.16.x
+        uses: actions/setup-go@v2
+        with:
+          go-version: 1.16.x
+        id: go
+
+      - name: Check out code
+        uses: actions/checkout@v2
+
+      - name: Install Tools
+        run: |
+          TEMP_PATH="$(mktemp -d)"
+          cd $TEMP_PATH
+
+          echo '::group::🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog'
+          curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b "${TEMP_PATH}" 2>&1
+          echo '::endgroup::'
+
+          echo '::group:: Installing boilerplate-check ... https://github.com/mattmoor/boilerplate-check'
+          go get github.com/mattmoor/boilerplate-check/cmd/boilerplate-check
+          echo '::endgroup::'
+
+          echo "${TEMP_PATH}" >> $GITHUB_PATH
+
+      - id: boilerplate_txt
+        uses: andstor/file-existence-action@v1
+        with:
+          files: ./hack/boilerplate/boilerplate.${{ matrix.extension }}.txt
+      - name: ${{ matrix.language }} license boilerplate
+        shell: bash
+        if: ${{ steps.boilerplate_txt.outputs.files_exists == 'true' }}
+        env:
+          REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
+        run: |
+          set -e
+          cd "${GITHUB_WORKSPACE}" || exit 1
+
+          echo '::group:: Running github.com/mattmoor/boilerplate-check for ${{ matrix.language }} with reviewdog 🐶 ...'
+          # Don't fail because of boilerplate-check
+          set +o pipefail
+          boilerplate-check check \
+            --boilerplate ./hack/boilerplate/boilerplate.${{ matrix.extension }}.txt \
+            --file-extension ${{ matrix.extension }} \
+            --exclude "(vendor|third_party)/" |
+          reviewdog -efm="%A%f:%l: %m" \
+                -efm="%C%.%#" \
+                -name="${{ matrix.language }} headers" \
+                -reporter="github-pr-check" \
+                -filter-mode="diff_context" \
+                -fail-on-error="true" \
+                -level="error"
+          echo '::endgroup::'
diff --git a/.github/workflows/knative-donotsubmit.yaml b/.github/workflows/knative-donotsubmit.yaml
new file mode 100644
index 00000000..d9d0a3b0
--- /dev/null
+++ b/.github/workflows/knative-donotsubmit.yaml
@@ -0,0 +1,61 @@
+# Copyright 2020 The Knative Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is automagically synced here from github.com/knative-sandbox/.github
+# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
+
+name: Do Not Submit
+
+on:
+  pull_request:
+    branches: [ 'main', 'master', 'release-*', 'mkdocs' ]
+
+jobs:
+
+  donotsubmit:
+    name: Do Not Submit
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Check out code
+        uses: actions/checkout@v2
+
+      - name: Do Not Submit
+        shell: bash
+        env:
+          REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
+        run: |
+          set -e
+          cd "${GITHUB_WORKSPACE}" || exit 1
+
+          TEMP_PATH="$(mktemp -d)"
+          PATH="${TEMP_PATH}:$PATH"
+
+          echo '::group::🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog'
+          curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b "${TEMP_PATH}" 2>&1
+          echo '::endgroup::'
+
+          echo '::group:: Running DO NOT SUBMIT with reviewdog 🐶 ...'
+          # Don't fail because of grep
+          set +o pipefail
+          find . -type f -not -path './vendor/*' -not -path './third_party/*' -not -path './.git/*' -not -path './.github/workflows/*' |
+          xargs grep -n "DO NOT SUBMIT" |
+          reviewdog -efm="%f:%l:%m" \
+                -name="DO NOT SUBMIT" \
+                -reporter="github-pr-check" \
+                -filter-mode="added" \
+                -fail-on-error="true" \
+                -level="error"
+
+          echo '::endgroup::'
diff --git a/.github/workflows/knative-go-build.yaml b/.github/workflows/knative-go-build.yaml
new file mode 100644
index 00000000..47e0f99e
--- /dev/null
+++ b/.github/workflows/knative-go-build.yaml
@@ -0,0 +1,64 @@
+# Copyright 2020 The Knative Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is automagically synced here from github.com/knative-sandbox/.github
+# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
+
+name: Build
+
+on:
+  pull_request:
+    branches: [ 'main', 'master', 'release-*', 'mkdocs' ]
+
+jobs:
+
+  build:
+    name: Build
+    strategy:
+      matrix:
+        go-version: [1.16.x]
+        platform: [ubuntu-latest]
+
+    runs-on: ${{ matrix.platform }}
+
+    steps:
+
+      - name: Set up Go ${{ matrix.go-version }}
+        uses: actions/setup-go@v2
+        with:
+          go-version: ${{ matrix.go-version }}
+        id: go
+
+      - name: Check out code
+        uses: actions/checkout@v2
+
+      - id: go_mod
+        uses: andstor/file-existence-action@v1
+        with:
+          files: go.mod
+
+      - name: Build
+        if: ${{ steps.go_mod.outputs.files_exists == 'true' }}
+        run: |
+          tags="$(grep -I  -r '// +build' . | \
+                grep -v '^./vendor/' | \
+                grep -v '^./hack/' | \
+                grep -v '^./third_party' | \
+                cut -f3 -d' ' | \
+                sort | uniq | \
+                grep -v '^!' | \
+                tr '\n' ' ')"
+
+          echo "Building with tags: ${tags}"
+          go test -vet=off -tags "${tags}" -exec echo ./...
diff --git a/.github/workflows/knative-releasability.yaml b/.github/workflows/knative-releasability.yaml
new file mode 100644
index 00000000..7ddcb819
--- /dev/null
+++ b/.github/workflows/knative-releasability.yaml
@@ -0,0 +1,157 @@
+# Copyright 2020 The Knative Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is automagically synced here from github.com/knative-sandbox/.github
+# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
+
+name: 'Releasability'
+
+on:
+  schedule:
+    - cron: '0 1 * * 1-5' # 6am Pacific, weekdays.
+
+  workflow_dispatch:      # Manual trigger.
+    inputs:
+      releaseFamily:
+        description: 'Release? (vX.Y)'
+      slackChannel:
+        description: 'Slack Channel? (release-#)'
+
+jobs:
+  releasability:
+    name: Releasability
+    runs-on: 'ubuntu-latest'
+
+    env:
+      #########################################
+      #   Update this section each release.   #
+      RELEASE: 'v0.25'
+      SLACK_CHANNEL: 'release-25'
+      #########################################
+
+    steps:
+      - name: Defaults
+        run: |
+          # If manual trigger sent releaseFamily and slackChannel, then override them
+          if [[ "${{ github.event.inputs.releaseFamily }}" != "" ]]; then
+            echo "RELEASE=${{ github.event.inputs.releaseFamily }}" >> $GITHUB_ENV
+          fi
+          if [[ "${{ github.event.inputs.slackChannel }}" != "" ]]; then
+            echo "SLACK_CHANNEL=${{ github.event.inputs.slackChannel }}" >> $GITHUB_ENV
+          fi
+          if [[ "${{ secrets.SLACK_WEBHOOK }}" != "" ]]; then
+            echo "SLACK_WEBHOOK=exists" >> $GITHUB_ENV
+          fi
+
+      - name: Set up Go 1.16.x
+        uses: actions/setup-go@v2
+        with:
+          go-version: 1.16.x
+
+      - name: Install Dependencies
+        run: GO111MODULE=on go get knative.dev/test-infra/buoy@main
+
+      - name: Check out code
+        uses: actions/checkout@v2
+
+      - name: Exists
+        id: exists
+        run: |
+          EXISTS=0
+          buoy exists go.mod --release ${RELEASE} --verbose || EXISTS=$?
+          if [[ "$EXISTS" -eq "0" ]]; then
+            EXISTS=true
+          else
+            EXISTS=false
+          fi
+          echo ::set-output name=release-branch::${EXISTS}
+
+      - name: Check
+        if: steps.exists.outputs.release-branch == 'false'
+        run: |
+          # The following pushes the stdout of buoy into $CHECK_MESSAGE
+          CHECK=0
+          echo 'CHECK_MESSAGE<<EOF' >> $GITHUB_ENV
+          buoy check go.mod --release ${RELEASE} --domain knative.dev --verbose >> $GITHUB_ENV 2>&1 || CHECK=$?
+          echo 'EOF' >> $GITHUB_ENV
+
+          # We just captured the return code of the buoy call, test it to see
+          # if we should continue validating. The next steps short circuit if
+          # we already know we are not ready for a release.
+          if [[ "$CHECK" -eq "0"  ]]; then
+            echo 'current=true' >> $GITHUB_ENV
+          else
+            echo 'current=false' >> $GITHUB_ENV
+          fi
+
+      - name: Upgrade
+        if: steps.exists.outputs.release-branch == 'false' && env.current == 'true'
+        run: |
+          # if update deps returns un-successful, then mark current to false.
+          if ! ./hack/update-deps.sh --release ${RELEASE} --upgrade; then
+            echo "VERIFY_MESSAGE=Unable to update deps for ${{ github.repository }}." >> $GITHUB_ENV
+            echo 'current=false' >> $GITHUB_ENV
+          fi
+
+      - name: Verify
+        if: steps.exists.outputs.release-branch == 'false' && env.current == 'true'
+        run: |
+          # If we don't run `git status` before the "git diff-index" it seems
+          # to list every file that's been touched by codegen.
+          git status
+
+          CHANGED="$(git diff-index --name-only HEAD --)"
+
+          # If we see no changes after the upgrade, then we are up to date.
+          if [[ "$CHANGED" == "" ]]; then
+              echo "VERIFY_MESSAGE=${{ github.repository }} up to date." >> $GITHUB_ENV
+          else
+              echo "VERIFY_MESSAGE=${{ github.repository }} is out of date." >> $GITHUB_ENV
+              echo "The following files are changed: $CHANGED"
+              echo 'current=false' >> $GITHUB_ENV
+          fi
+
+      - name: Status GO
+        if: steps.exists.outputs.release-branch == 'false' && env.current == 'true'
+        run: |
+          echo 'SLACK_COLOR=#098e00' >> $GITHUB_ENV
+          echo 'SLACK_TITLE=Releasability for ${{ github.repository }} @ ${{ env.RELEASE }} is GO!' >> $GITHUB_ENV
+
+      - name: Status NO-GO
+        if: steps.exists.outputs.release-branch == 'false' && env.current == 'false'
+        run: |
+          echo 'SLACK_COLOR=#8E1600' >> $GITHUB_ENV
+          echo 'SLACK_TITLE=Releasability for ${{ github.repository }} @ ${{ env.RELEASE }} is NO-GO!' >> $GITHUB_ENV
+
+      - name: Post status to Slack
+        # Note: using env.SLACK_WEBHOOK here because secrets are not allowed in the if block.
+        if: env.SLACK_WEBHOOK != '' && steps.exists.outputs.release-branch == 'false'
+        uses: rtCamp/action-slack-notify@v2.1.0
+        env:
+          SLACK_ICON: http://github.com/knative.png?size=48
+          SLACK_USERNAME: github-actions
+          SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
+          MSG_MINIMAL: 'true'
+          SLACK_MESSAGE: |
+            ${{ env.CHECK_MESSAGE }}
+            ${{ env.VERIFY_MESSAGE }}
+            For detailed logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
+
+      - name: Fail if NO-GO
+        if: steps.exists.outputs.release-branch == 'false' && env.current == 'false'
+        run: |
+          # When we have figured out that things are NO-GO, we intentionally fail the job
+          # so that the status badge shows up red and we can use the badges to create a
+          # releasability dashboard for all of the repos.
+          exit 1
diff --git a/.github/workflows/knative-release-notes.yaml b/.github/workflows/knative-release-notes.yaml
new file mode 100644
index 00000000..172eb390
--- /dev/null
+++ b/.github/workflows/knative-release-notes.yaml
@@ -0,0 +1,96 @@
+# Copyright 2020 The Knative Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is automagically synced here from github.com/knative-sandbox/.github
+# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
+
+name: 'Release Notes'
+
+on:
+  workflow_dispatch:
+    inputs:
+      branch:
+        description: 'Branch? (main)'
+        required: true
+        default: 'main'
+      start-sha:
+        description: 'Starting SHA? (last tag on branch)'
+      end-sha:
+        description: 'Ending SHA? (latest HEAD)'
+
+jobs:
+  release-notes:
+    name: Release Notes
+    runs-on: 'ubuntu-latest'
+
+    env:
+      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+    steps:
+      - name: Set up Go
+        uses: actions/setup-go@v2
+        with:
+          go-version: 1.16.x
+
+      - name: Install Dependencies
+        run: GO111MODULE=on go get k8s.io/release/cmd/release-notes
+
+      - name: Check out code
+        uses: actions/checkout@v2
+        with:
+          # fetch-depth of 0 indicates all history for all branches and tags.
+          fetch-depth: 0
+
+      # Note: Defaults needs to run after we check out the repo.
+      - name: Defaults
+        run: |
+          echo ORG=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}') >> $GITHUB_ENV
+          echo REPO=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}') >> $GITHUB_ENV
+
+          echo "BRANCH=${{ github.event.inputs.branch }}" >> $GITHUB_ENV
+
+          if [[ "${{ github.event.inputs.start-sha }}" != "" ]]; then
+            echo "START_SHA=${{ github.event.inputs.start-sha }}" >> $GITHUB_ENV
+          else
+            # Default Starting SHA (thanks @dprotaso)
+            export semver=$(git describe --match "v[0-9]*" --abbrev=0)
+            echo "Using ${semver} tag for starting sha."
+            echo START_SHA=$(git rev-list -n 1 "${semver}") >> $GITHUB_ENV
+          fi
+
+          if [[ "${{ github.event.inputs.end-sha }}" != "" ]]; then
+            echo "END_SHA=${{ github.event.inputs.end-sha }}" >> $GITHUB_ENV
+          else
+            # Default Ending SHA (thanks @dprotaso)
+            echo "END_SHA=$(git rev-list -n 1 HEAD)" >> $GITHUB_ENV
+          fi
+
+      - name: Generate Notes
+        run: |
+          # See  https://github.com/kubernetes/release/tree/master/cmd/release-notes for options.
+          # Note: we are setting env vars in the Defaults step.
+          release-notes \
+            --required-author "" \
+            --repo-path       "$(pwd)" \
+            --output          release-notes.md
+
+      - name: Display Notes
+        run: |
+          cat release-notes.md
+
+      - name: Archive Release Notes
+        uses: actions/upload-artifact@v2
+        with:
+          name: release-notes.md
+          path: release-notes.md
diff --git a/.github/workflows/knative-security.yaml b/.github/workflows/knative-security.yaml
new file mode 100644
index 00000000..635a8465
--- /dev/null
+++ b/.github/workflows/knative-security.yaml
@@ -0,0 +1,50 @@
+# Copyright 2020 The Knative Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is automagically synced here from github.com/knative-sandbox/.github
+# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
+
+name: 'Security'
+
+on:
+  push:
+    branches: [ 'main', 'master', 'release-*', 'mkdocs' ]
+
+  pull_request:
+    branches: [ 'main', 'master', 'release-*', 'mkdocs' ]
+
+jobs:
+  analyze:
+    name: Analyze
+    runs-on: ubuntu-latest
+
+    steps:
+    - name: Checkout repository
+      uses: actions/checkout@v2
+      with:
+        # We must fetch at least the immediate parents so that if this is
+        # a pull request then we can checkout the head.
+        fetch-depth: 2
+
+    # Initializes the CodeQL tools for scanning.
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v1
+      with:
+        languages: go
+
+    - name: Autobuild
+      uses: github/codeql-action/autobuild@v1
+
+    - name: Perform CodeQL Analysis
+      uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/knative-stale.yaml b/.github/workflows/knative-stale.yaml
new file mode 100644
index 00000000..899890a3
--- /dev/null
+++ b/.github/workflows/knative-stale.yaml
@@ -0,0 +1,49 @@
+# Copyright 2020 The Knative Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is automagically synced here from github.com/knative-sandbox/.github
+# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
+
+name: 'Close stale'
+
+on:
+  schedule:
+  - cron: '0 1 * * *'
+
+jobs:
+  stale:
+    runs-on: 'ubuntu-latest'
+    steps:
+    - uses: 'actions/stale@v3'
+      with:
+        repo-token: '${{ secrets.GITHUB_TOKEN }}' # No need to setup
+
+        stale-issue-message: |-
+          This issue is stale because it has been open for 90 days with no
+          activity. It will automatically close after 30 more days of
+          inactivity. Reopen the issue with `/reopen`. Mark the issue as
+          fresh by adding the comment `/remove-lifecycle stale`.
+        stale-issue-label: 'lifecycle/stale'
+        exempt-issue-labels: 'lifecycle/frozen,triage/accepted'
+
+        stale-pr-message: |-
+          This Pull Request is stale because it has been open for 90 days with
+          no activity. It will automatically close after 30 more days of
+          inactivity. Reopen with `/reopen`. Mark as fresh by adding the
+          comment `/remove-lifecycle stale`.
+        stale-pr-label: 'lifecycle/stale'
+        exempt-pr-labels: 'lifecycle/frozen'
+
+        days-before-stale: 90
+        days-before-close: 30
diff --git a/.github/workflows/knative-style.yaml b/.github/workflows/knative-style.yaml
new file mode 100644
index 00000000..5f5caaaa
--- /dev/null
+++ b/.github/workflows/knative-style.yaml
@@ -0,0 +1,256 @@
+# Copyright 2020 The Knative Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is automagically synced here from github.com/knative-sandbox/.github
+# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
+
+name: Code Style
+
+on:
+  pull_request:
+    branches: [ 'main', 'master', 'release-*', 'mkdocs' ]
+
+jobs:
+
+  autoformat:
+    name: Auto-format and Check
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false # Keep running if one leg fails.
+      matrix:
+        tool:
+          - goimports
+          - gofmt
+
+        include:
+        - tool: gofmt
+          options: -s
+        - tool: goimports
+          importpath: golang.org/x/tools/cmd/goimports
+
+    steps:
+      - name: Set up Go 1.16.x
+        uses: actions/setup-go@v2
+        with:
+          go-version: 1.16.x
+        id: go
+
+      - name: Check out code
+        uses: actions/checkout@v2
+
+      - name: Install Dependencies
+        if: ${{ matrix.importpath != '' }}
+        run: |
+          cd $(mktemp -d)
+          GO111MODULE=on go get ${{ matrix.importpath }}
+
+      - name: ${{ matrix.tool }} ${{ matrix.options }}
+        shell: bash
+        run: >
+          ${{ matrix.tool }} ${{ matrix.options }} -w
+          $(find .
+          -path './vendor' -prune
+          -o -path './third_party' -prune
+          -o -name '*.pb.go' -prune
+          -o -name 'wire_gen.go' -prune
+          -o -type f -name '*.go' -print)
+
+      - name: Verify ${{ matrix.tool }}
+        shell: bash
+        run: |
+          # From: https://backreference.org/2009/12/23/how-to-match-newlines-in-sed/
+          # This is to leverage this workaround:
+          # https://github.com/actions/toolkit/issues/193#issuecomment-605394935
+          function urlencode() {
+            sed ':begin;$!N;s/\n/%0A/;tbegin'
+          }
+          if [[ $(git diff-index --name-only HEAD --) ]]; then
+              for x in $(git diff-index --name-only HEAD --); do
+                echo "::error file=$x::Please run ${{ matrix.tool }} ${{ matrix.options }}.%0A$(git diff $x | urlencode)"
+              done
+              echo "${{ github.repository }} is out of style. Please run ${{ matrix.tool }} ${{ matrix.options }}."
+              exit 1
+          fi
+          echo "${{ github.repository }} is formatted correctly."
+
+  lint:
+    name: Lint
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Set up Go 1.16.x
+        uses: actions/setup-go@v2
+        with:
+          go-version: 1.16.x
+        id: go
+
+      - name: Check out code
+        uses: actions/checkout@v2
+
+      - name: Install Tools
+        env:
+          WOKE_VERSION: v0.13.0
+        run: |
+          TEMP_PATH="$(mktemp -d)"
+          cd $TEMP_PATH
+
+          echo '::group::🐶 Installing reviewdog ... https://github.com/reviewdog/reviewdog'
+          curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b "${TEMP_PATH}" 2>&1
+          echo '::endgroup::'
+
+          echo '::group:: Installing misspell ... https://github.com/client9/misspell'
+          go get github.com/client9/misspell/cmd/misspell
+          echo '::endgroup::'
+
+          echo '::group:: Installing woke ... https://github.com/get-woke/woke'
+          curl -sfL https://raw.githubusercontent.com/get-woke/woke/main/install.sh | sh -s -- -b "${TEMP_PATH}" "${WOKE_VERSION}" 2>&1
+          echo '::endgroup::'
+
+          echo "${TEMP_PATH}" >> $GITHUB_PATH
+
+      - id: golangci_configuration
+        uses: andstor/file-existence-action@v1
+        with:
+          files: .golangci.yaml
+      - name: Go Lint
+        if: steps.golangci_configuration.outputs.files_exists == 'true'
+        uses: golangci/golangci-lint-action@v2
+        with:
+          version: v1.42
+
+      - name: misspell
+        shell: bash
+        if: ${{ always() }}
+        env:
+          REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
+        run: |
+          set -e
+          cd "${GITHUB_WORKSPACE}" || exit 1
+
+          echo '::group:: Running github.com/client9/misspell with reviewdog 🐶 ...'
+          # Don't fail because of misspell
+          set +o pipefail
+          # Exclude generated and vendored files, plus some legacy
+          # paths until we update all .gitattributes
+          git ls-files |
+          git check-attr --stdin linguist-generated | grep -Ev ': (set|true)$' | cut -d: -f1 |
+          git check-attr --stdin linguist-vendored | grep -Ev ': (set|true)$' | cut -d: -f1 |
+          grep -Ev '^(vendor/|third_party/|.git)' |
+          xargs misspell -i importas -error |
+          reviewdog -efm="%f:%l:%c: %m" \
+                -name="github.com/client9/misspell" \
+                -reporter="github-pr-check" \
+                -filter-mode="added" \
+                -fail-on-error="true" \
+                -level="error"
+
+          echo '::endgroup::'
+
+      - name: trailing whitespace
+        shell: bash
+        if: ${{ always() }}
+        env:
+          REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
+        run: |
+          set -e
+          cd "${GITHUB_WORKSPACE}" || exit 1
+
+          echo '::group:: Flagging trailing whitespace with reviewdog 🐶 ...'
+          # Don't fail because of grep
+          set +o pipefail
+          
+          # Exclude generated and vendored files, plus some legacy
+          # paths until we update all .gitattributes
+          git ls-files |
+          git check-attr --stdin linguist-generated | grep -Ev ': (set|true)$' | cut -d: -f1 |
+          git check-attr --stdin linguist-vendored | grep -Ev ': (set|true)$' | cut -d: -f1 |
+          grep -Ev '^(vendor/|third_party/|.git)' |
+          xargs grep -nE " +$" |
+          reviewdog -efm="%f:%l:%m" \
+                -name="trailing whitespace" \
+                -reporter="github-pr-check" \
+                -filter-mode="added" \
+                -fail-on-error="true" \
+                -level="error"
+
+          echo '::endgroup::'
+
+      - name: EOF newline
+        shell: bash
+        if: ${{ always() }}
+        env:
+          REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
+        run: |
+          set -e
+          cd "${GITHUB_WORKSPACE}" || exit 1
+
+          echo '::group:: Flagging missing EOF newlines with reviewdog 🐶 ...'
+          # Don't fail because of misspell
+          set +o pipefail
+          # Lint exclude rule:
+          #  - nothing in vendor/
+          #  - nothing in third_party
+          #  - nothing in .git/
+          #  - no *.ai (Adobe Illustrator) files.
+          LINT_FILES=$(git ls-files |
+          git check-attr --stdin linguist-generated | grep -Ev ': (set|true)$' | cut -d: -f1 |
+          git check-attr --stdin linguist-vendored | grep -Ev ': (set|true)$' | cut -d: -f1 |
+          grep -Ev '^(vendor/|third_party/|.git)' |
+          grep -v '\.ai$')
+
+          for x in $LINT_FILES; do
+            # Based on https://stackoverflow.com/questions/34943632/linux-check-if-there-is-an-empty-line-at-the-end-of-a-file
+            if [[ -f $x && ! ( -s "$x" && -z "$(tail -c 1 $x)" ) ]]; then
+              # We add 1 to `wc -l` here because of this limitation (from the man page):
+              # Characters beyond the final <newline> character will not be included in the line count.
+              echo $x:$((1 + $(wc -l $x | tr -s ' ' | cut -d' ' -f 1))): Missing newline
+            fi
+          done |
+          reviewdog -efm="%f:%l: %m" \
+                -name="EOF Newline" \
+                -reporter="github-pr-check" \
+                -filter-mode="added" \
+                -fail-on-error="true" \
+                -level="error"
+
+          echo '::endgroup::'
+
+      # This is mostly copied from https://github.com/get-woke/woke-action-reviewdog/blob/main/entrypoint.sh
+      # since their action is not yet released under a stable version.
+      - name: Language
+        if: ${{ always() && github.event_name == 'pull_request' }}
+        shell: bash
+        env:
+          REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
+        run: |
+          set -e
+          cd "${GITHUB_WORKSPACE}" || exit 1
+
+          # Create a minimal .wokeignore if none already exist.
+          if [ ! -f .wokeignore ]; then
+            cat > .wokeignore <<EOF
+            vendor/*
+            third_party/*
+          EOF
+          fi
+
+          echo '::group:: Running woke with reviewdog 🐶 ...'
+          woke --output simple \
+            | reviewdog -efm="%f:%l:%c: %m" \
+                -name="woke" \
+                -reporter="github-pr-check" \
+                -filter-mode="added" \
+                -fail-on-error="true" \
+                -level="error"
+          echo '::endgroup::'
diff --git a/.github/workflows/knative-verify.yaml b/.github/workflows/knative-verify.yaml
new file mode 100644
index 00000000..94571234
--- /dev/null
+++ b/.github/workflows/knative-verify.yaml
@@ -0,0 +1,88 @@
+# Copyright 2020 The Knative Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is automagically synced here from github.com/knative-sandbox/.github
+# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
+
+name: Verify
+
+on:
+  pull_request:
+    branches: [ 'main', 'master', 'release-*', 'mkdocs' ]
+
+jobs:
+
+  verify:
+    name: Verify Deps and Codegen
+    strategy:
+      matrix:
+        go-version: [1.16.x]
+        platform: [ubuntu-latest]
+
+    runs-on: ${{ matrix.platform }}
+
+    env:
+      GOPATH: ${{ github.workspace }}
+
+    steps:
+
+    - name: Set up Go ${{ matrix.go-version }}
+      uses: actions/setup-go@v2
+      with:
+        go-version: ${{ matrix.go-version }}
+      id: go
+
+    - name: Install Dependencies
+      run: |
+        curl -L https://github.com/google/ko/releases/download/v0.6.0/ko_0.6.0_Linux_x86_64.tar.gz | tar xzf - ko
+        chmod +x ./ko
+        sudo mv ko /usr/local/bin
+        go get github.com/google/go-licenses
+
+    - name: Check out code onto GOPATH
+      uses: actions/checkout@v2
+      with:
+        path: ./src/knative.dev/${{ github.event.repository.name }}
+
+    - name: Update Codegen
+      shell: bash
+      run: |
+        pushd ./src/knative.dev/${{ github.event.repository.name }}
+        [[ ! -f hack/update-codegen.sh ]] || ./hack/update-codegen.sh
+        popd
+
+    - name: Verify
+      shell: bash
+      run: |
+        # From: https://backreference.org/2009/12/23/how-to-match-newlines-in-sed/
+        # This is to leverage this workaround:
+        # https://github.com/actions/toolkit/issues/193#issuecomment-605394935
+        function urlencode() {
+          sed ':begin;$!N;s/\n/%0A/;tbegin'
+        }
+
+        pushd ./src/knative.dev/${{ github.event.repository.name }}
+        if [[ -z "$(git status --porcelain)" ]]; then
+            echo "${{ github.repository }} up to date."
+        else
+            # Print it both ways because sometimes we haven't modified the file (e.g. zz_generated),
+            # and sometimes we have (e.g. configmap checksum).
+            echo "Found diffs in: $(git diff-index --name-only HEAD --)"
+            for x in $(git diff-index --name-only HEAD --); do
+                echo "::error file=$x::Please run ./hack/update-codegen.sh.%0A$(git diff $x | urlencode)"
+            done
+            echo "${{ github.repository }} is out of date. Please run hack/update-codegen.sh"
+            exit 1
+        fi
+        popd
diff --git a/client.go b/client.go
index f34b29a3..39f0a210 100644
--- a/client.go
+++ b/client.go
@@ -8,9 +8,9 @@ import (
 	"io/ioutil"
 	"os"
 	"path/filepath"
+	"runtime"
 	"sort"
 	"sync"
-	"runtime"
 
 	"gopkg.in/yaml.v2"
 )
diff --git a/cmd/config.go b/cmd/config.go
index 71857af6..84a4e96b 100644
--- a/cmd/config.go
+++ b/cmd/config.go
@@ -2,6 +2,7 @@ package cmd
 
 import (
 	"fmt"
+
 	"github.com/AlecAivazis/survey/v2"
 	"github.com/AlecAivazis/survey/v2/terminal"
 	"github.com/ory/viper"
@@ -23,7 +24,7 @@ type functionLoaderSaver interface {
 	functionSaver
 }
 
-type standardLoaderSaver struct {}
+type standardLoaderSaver struct{}
 
 func (s standardLoaderSaver) Load(path string) (fn.Function, error) {
 	f, err := fn.NewFunction(path)
diff --git a/cmd/func/main.go b/cmd/func/main.go
index 4a1b6bf7..bc79adf8 100644
--- a/cmd/func/main.go
+++ b/cmd/func/main.go
@@ -2,10 +2,11 @@ package main
 
 import (
 	"context"
-	"knative.dev/kn-plugin-func/cmd"
 	"os"
 	"os/signal"
 	"syscall"
+
+	"knative.dev/kn-plugin-func/cmd"
 )
 
 // Statically-populated build metadata set
diff --git a/cmd/root.go b/cmd/root.go
index 23c1fe51..f9b1231b 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -1,11 +1,13 @@
 package cmd
 
 import (
+	"bytes"
 	"context"
 	"fmt"
 	"os"
 	"path/filepath"
 	"strings"
+	"text/template"
 
 	"github.com/mitchellh/go-homedir"
 	"github.com/ory/viper"
@@ -16,7 +18,19 @@ import (
 	fn "knative.dev/kn-plugin-func"
 )
 
-// The root of the command tree defines the command name, descriotion, globally
+var exampleTemplate = template.Must(template.New("example").Parse(`
+# Create a node function called "node-sample" and enter the directory
+{{.}} create myfunc && cd myfunc
+
+# Build the container image, push it to a registry and deploy it to the connected Knative cluster
+# (replace <registry/user> with something like quay.io/user with an account that have you access to)
+{{.}} deploy --registry <registry/user>
+
+# Curl the service with the service URL
+curl $(kn service describe myfunc -o url)
+`))
+
+// The root of the command tree defines the command name, description, globally
 // available flags, etc.  It has no action of its own, such that running the
 // resultant binary with no arguments prints the help/usage text.
 var root = &cobra.Command{
@@ -27,22 +41,34 @@ var root = &cobra.Command{
 	Long: `Serverless functions
 
 Create, build and deploy functions in serverless containers for multiple runtimes on Knative`,
-	Example: `
-# Create a node function called "node-sample" and enter the directory
-kn func create myfunc && cd myfunc
+}
 
-# Build the container image, push it to a registry and deploy it to the connected Knative cluster
-# (replace <registry/user> with something like quay.io/user with an account that have you access to)
-kn func deploy --registry <registry/user>
+func init() {
+	var err error
+	root.Example, err = replaceNameInTemplate("func", "example")
+	if err != nil {
+		root.Example = "Usage could not be loaded"
+	}
+}
 
-# Curl the service with the service URL
-curl $(kn service describe myfunc -o url)
-`,
+func replaceNameInTemplate(name, template string) (string, error) {
+	var buffer bytes.Buffer
+	err := exampleTemplate.ExecuteTemplate(&buffer, template, name)
+	if err != nil {
+		return "", err
+	}
+	return buffer.String(), nil
 }
 
 // NewRootCmd is used to initialize func as kn plugin
-func NewRootCmd() *cobra.Command {
-	return root
+func NewRootCmd() (*cobra.Command, error) {
+	root.Use = "kn func"
+	var err error
+	root.Example, err = replaceNameInTemplate("kn func", "example")
+	if err != nil {
+		root.Example = "Usage could not be loaded"
+	}
+	return root, err
 }
 
 // When the code is loaded into memory upon invocation, the cobra/viper packages
diff --git a/cmd/version.go b/cmd/version.go
index 34cee3bb..e53f4e95 100644
--- a/cmd/version.go
+++ b/cmd/version.go
@@ -25,9 +25,9 @@ func init() {
 }
 
 var versionCmd = &cobra.Command{
-	Use:        "version",
-	Short:      "Show the version",
-	Long:       `Show the version
+	Use:   "version",
+	Short: "Show the version",
+	Long: `Show the version
 
 Use the --verbose option to include the build date stamp and commit hash"
 `,
diff --git a/docker/credentials_helper.go b/docker/credentials_helper.go
index 32ab3be2..7f8c7259 100644
--- a/docker/credentials_helper.go
+++ b/docker/credentials_helper.go
@@ -3,12 +3,13 @@ package docker
 import (
 	"encoding/json"
 	"fmt"
-	"github.com/containers/image/v5/types"
-	"github.com/docker/docker-credential-helpers/client"
 	"net/url"
 	"os"
 	"path/filepath"
 	"strings"
+
+	"github.com/containers/image/v5/types"
+	"github.com/docker/docker-credential-helpers/client"
 )
 
 func GetCredentialsFromCredsStore(registry string) (types.DockerAuthConfig, error) {
diff --git a/k8s/client.go b/k8s/client.go
index 6a2d2c4b..bdf35e0e 100644
--- a/k8s/client.go
+++ b/k8s/client.go
@@ -7,7 +7,6 @@ import (
 	"k8s.io/client-go/tools/clientcmd"
 )
 
-
 func NewKubernetesClientset(namespace string) (*kubernetes.Clientset, error) {
 
 	restConfig, err := GetClientConfig().ClientConfig()
diff --git a/knative/lister.go b/knative/lister.go
index 85aa03fd..8447308d 100644
--- a/knative/lister.go
+++ b/knative/lister.go
@@ -2,6 +2,7 @@ package knative
 
 import (
 	"context"
+
 	corev1 "k8s.io/api/core/v1"
 	clientservingv1 "knative.dev/client/pkg/serving/v1"
 	"knative.dev/pkg/apis"
diff --git a/mock/builder.go b/mock/builder.go
index 4980de56..e0f9d965 100644
--- a/mock/builder.go
+++ b/mock/builder.go
@@ -2,6 +2,7 @@ package mock
 
 import (
 	"context"
+
 	fn "knative.dev/kn-plugin-func"
 )
 
diff --git a/mock/lister.go b/mock/lister.go
index 0e17b816..76f788fa 100644
--- a/mock/lister.go
+++ b/mock/lister.go
@@ -2,6 +2,7 @@ package mock
 
 import (
 	"context"
+
 	fn "knative.dev/kn-plugin-func"
 )
 
diff --git a/mock/runner.go b/mock/runner.go
index 7cf9c95c..bc906e9c 100644
--- a/mock/runner.go
+++ b/mock/runner.go
@@ -2,6 +2,7 @@ package mock
 
 import (
 	"context"
+
 	fn "knative.dev/kn-plugin-func"
 )
 
diff --git a/plugin/plugin.go b/plugin/plugin.go
index 3a9f8c4b..20fdb60b 100644
--- a/plugin/plugin.go
+++ b/plugin/plugin.go
@@ -35,7 +35,7 @@ func (f *funcPlugin) Execute(args []string) error {
 		cancel()
 	}()
 
-	rootCmd := cmd.NewRootCmd()
+	rootCmd, _ := cmd.NewRootCmd()
 	info, _ := debug.ReadBuildInfo()
 	for _, dep := range info.Deps {
 		if strings.Contains(dep.Path, "boson-project/func") {
@@ -59,7 +59,7 @@ func (f *funcPlugin) CommandParts() []string {
 	return []string{"func"}
 }
 
-// Path is empty because its an internal plugins
+// Path is empty because its an internal plugin
 func (f *funcPlugin) Path() string {
 	return ""
 }


Test patch:
diff --git a/.github/workflows/knative-go-test.yaml b/.github/workflows/knative-go-test.yaml
new file mode 100644
index 00000000..75b2a659
--- /dev/null
+++ b/.github/workflows/knative-go-test.yaml
@@ -0,0 +1,75 @@
+# Copyright 2020 The Knative Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is automagically synced here from github.com/knative-sandbox/.github
+# repo by knobots: https://github.com/knative-sandbox/knobots and will be overwritten.
+
+name: Test
+
+on:
+
+  push:
+    branches: [ 'main', 'master', 'mkdocs' ]
+
+  pull_request:
+    branches: [ 'main', 'master', 'release-*', 'mkdocs' ]
+
+jobs:
+
+  test:
+    name: Unit Tests
+    strategy:
+      matrix:
+        go-version: [1.16.x]
+        platform: [ubuntu-latest]
+
+    runs-on: ${{ matrix.platform }}
+
+    steps:
+
+      - name: Set up Go ${{ matrix.go-version }}
+        uses: actions/setup-go@v2
+        with:
+          go-version: ${{ matrix.go-version }}
+        id: go
+
+      - name: Check out code
+        uses: actions/checkout@v2
+        with:
+          fetch-depth: 0
+
+      - name: Merge upstream
+        if: github.event_name == 'pull_request'
+        run: |
+          git remote add upstream https://github.com/${{ github.repository }}.git
+          git fetch upstream ${{ github.base_ref }}
+          git pull --no-rebase --no-commit upstream ${{ github.base_ref }}
+        shell: bash
+
+      - name: Check for .codecov.yaml
+        id: codecov-enabled
+        uses: andstor/file-existence-action@v1
+        with:
+          files: .codecov.yaml
+
+      - if: steps.codecov-enabled.outputs.files_exists == 'true'
+        name: Produce Go Coverage
+        run: echo 'COVER_OPTS=-coverprofile=coverage.txt -covermode=atomic' >> $GITHUB_ENV
+
+      - name: Test
+        run: go test -race $COVER_OPTS ./...
+
+      - if: steps.codecov-enabled.outputs.files_exists == 'true'
+        name: Codecov
+        uses: codecov/codecov-action@v1
diff --git a/cmd/config_labels_test.go b/cmd/config_labels_test.go
index 4ceee9af..7680526b 100644
--- a/cmd/config_labels_test.go
+++ b/cmd/config_labels_test.go
@@ -4,15 +4,16 @@ package cmd
 
 import (
 	"context"
-	"github.com/Netflix/go-expect"
-	"github.com/hinshun/vt10x"
-	"github.com/spf13/cobra"
-	fn "knative.dev/kn-plugin-func"
 	"os"
 	"reflect"
 	"sync"
 	"testing"
 	"time"
+
+	"github.com/Netflix/go-expect"
+	"github.com/hinshun/vt10x"
+	"github.com/spf13/cobra"
+	fn "knative.dev/kn-plugin-func"
 )
 
 type mockFunctionLoaderSaver struct {
@@ -49,21 +50,21 @@ func createRunFunc(cmd *cobra.Command, t *testing.T) func(subcmd string, input .
 		wg.Add(1)
 		go func() {
 			//defer wg.Done()
-			_,_ = c.ExpectEOF()
+			_, _ = c.ExpectEOF()
 		}()
 		go func() {
 			defer wg.Done()
-			time.Sleep(time.Millisecond*50)
+			time.Sleep(time.Millisecond * 50)
 			for _, s := range input {
 				_, _ = c.Send(s)
-				time.Sleep(time.Millisecond*50)
+				time.Sleep(time.Millisecond * 50)
 			}
 		}()
 
 		a := []string{subcmd}
 		cmd.SetArgs(a)
 
-		func () {
+		func() {
 			defer withMockedStdio(t, c)()
 			err = cmd.ExecuteContext(ctx)
 			wg.Wait()
@@ -93,9 +94,9 @@ func withMockedStdio(t *testing.T, c *expect.Console) func() {
 }
 
 const (
-	arrowUp = "\033[A"
+	arrowUp   = "\033[A"
 	arrowDown = "\033[B"
-	enter = "\r"
+	enter     = "\r"
 )
 
 func TestNewConfigLabelsCmd(t *testing.T) {
@@ -107,33 +108,31 @@ func TestNewConfigLabelsCmd(t *testing.T) {
 
 	run := createRunFunc(cmd, t)
 
-
-	p := func (k,v string) fn.Label {
+	p := func(k, v string) fn.Label {
 		return fn.Label{Key: &k, Value: &v}
 	}
 
-	assertLabel := func (ps fn.Labels) {
+	assertLabel := func(ps fn.Labels) {
 		t.Helper()
 		assertLabelEq(t, *labels, ps)
 	}
 
 	run("add", enter, "a", enter, "b", enter)
-	assertLabel(fn.Labels{p("a","b")})
+	assertLabel(fn.Labels{p("a", "b")})
 
 	run("add", enter, enter, "c", enter, "d", enter)
-	assertLabel(fn.Labels{p("a","b"), p("c", "d")})
+	assertLabel(fn.Labels{p("a", "b"), p("c", "d")})
 
 	run("add", arrowUp, arrowUp, enter, enter, "e", enter, "f", enter)
-	assertLabel( fn.Labels{p("e","f"), p("a","b"), p("c", "d")})
+	assertLabel(fn.Labels{p("e", "f"), p("a", "b"), p("c", "d")})
 
 	run("remove", arrowDown, enter)
-	assertLabel(fn.Labels{p("e","f"), p("c", "d")})
+	assertLabel(fn.Labels{p("e", "f"), p("c", "d")})
 }
 
-
 func TestListLabels(t *testing.T) {
 
-	p := func (k,v string) fn.Label {
+	p := func(k, v string) fn.Label {
 		return fn.Label{Key: &k, Value: &v}
 	}
 
@@ -154,7 +153,7 @@ func TestListLabels(t *testing.T) {
 	cmd.SetArgs(make([]string, 0))
 
 	errChan := make(chan error, 1)
-	func () {
+	func() {
 		var err error
 		defer func() {
 			errChan <- err
@@ -183,7 +182,7 @@ func TestListLabels(t *testing.T) {
 		}
 	}
 
-	err = <- errChan
+	err = <-errChan
 	if err != nil {
 		t.Fatal(err)
 	}
diff --git a/cmd/root_test.go b/cmd/root_test.go
index 84b84d28..ba13f9df 100644
--- a/cmd/root_test.go
+++ b/cmd/root_test.go
@@ -117,3 +117,26 @@ func Test_mergeEnvMaps(t *testing.T) {
 		})
 	}
 }
+
+func Test_CMDParameterized(t *testing.T) {
+
+	if root.Use != "func" {
+		t.Fatalf("default command use should be \"func\".")
+	}
+
+	usageExample, err := replaceNameInTemplate("func", "example")
+	if root.Example != usageExample || err != nil {
+		t.Fatalf("default command example should assume \"func\" as executable name. error: %v", err)
+	}
+
+	cmd, err := NewRootCmd()
+	if cmd.Use != "kn func" && err != nil {
+		t.Fatalf("plugin command use should be \"kn func\".")
+	}
+
+	usageExample, _ = replaceNameInTemplate("kn func", "example")
+	cmd, err = NewRootCmd()
+	if cmd.Example != usageExample || err != nil {
+		t.Fatalf("plugin command example should assume \"kn func\" as executable name. error: %v", err)
+	}
+}
diff --git a/config_test.go b/config_test.go
index 994adb33..814b4741 100644
--- a/config_test.go
+++ b/config_test.go
@@ -590,7 +590,7 @@ func Test_validateLabels(t *testing.T) {
 				},
 			},
 			1,
-		},{
+		}, {
 			"incorrect entry - missing multiple keys",
 			Labels{
 				Label{
diff --git a/docker/credentials_helper_test.go b/docker/credentials_helper_test.go
index 81ec1a4c..8f50c1b9 100644
--- a/docker/credentials_helper_test.go
+++ b/docker/credentials_helper_test.go
@@ -4,9 +4,9 @@ import "testing"
 
 func Test_to2ndLevelDomain(t *testing.T) {
 	tests := []struct {
-		name string
+		name   string
 		rawurl string
-		want string
+		want   string
 	}{
 		{"2nd level", "quay.io", "quay.io"},
 		{"3nd level", "sub.quay.io", "quay.io"},
@@ -27,4 +27,3 @@ func Test_to2ndLevelDomain(t *testing.T) {
 		})
 	}
 }
-
diff --git a/test/_e2e/cmd_build_test.go b/test/_e2e/cmd_build_test.go
index a2819768..f4540764 100644
--- a/test/_e2e/cmd_build_test.go
+++ b/test/_e2e/cmd_build_test.go
@@ -6,7 +6,7 @@ import (
 )
 
 // Build runs `func build' command for a given test project.
-func Build(t *testing.T, knFunc *TestShellCmdRunner, project *FunctionTestProject)  {
+func Build(t *testing.T, knFunc *TestShellCmdRunner, project *FunctionTestProject) {
 
 	result := knFunc.Exec("build", "--path", project.ProjectPath, "--registry", GetRegistry())
 	if result.Error != nil {
diff --git a/test/_e2e/cmd_delete_test.go b/test/_e2e/cmd_delete_test.go
index 902a74e8..4e976bfe 100644
--- a/test/_e2e/cmd_delete_test.go
+++ b/test/_e2e/cmd_delete_test.go
@@ -5,7 +5,7 @@ import (
 )
 
 // Delete runs `func delete' command for a given test project and verifies it get deleted
-func Delete(t *testing.T, knFunc *TestShellCmdRunner, project *FunctionTestProject)  {
+func Delete(t *testing.T, knFunc *TestShellCmdRunner, project *FunctionTestProject) {
 	// Invoke delete command
 	result := knFunc.Exec("delete", project.FunctionName)
 	if result.Error != nil && project.IsDeployed {
diff --git a/test/_e2e/cmd_deploy_test.go b/test/_e2e/cmd_deploy_test.go
index 9fa6d78e..2977fdff 100644
--- a/test/_e2e/cmd_deploy_test.go
+++ b/test/_e2e/cmd_deploy_test.go
@@ -8,7 +8,7 @@ import (
 
 // Deploy runs `func deploy' command for a given test project. It collects the URL from output
 // and store on test project, so it can be used later by any another test
-func Deploy(t *testing.T, knFunc *TestShellCmdRunner, project *FunctionTestProject)  {
+func Deploy(t *testing.T, knFunc *TestShellCmdRunner, project *FunctionTestProject) {
 
 	var result TestShellCmdResult
 	if project.IsBuilt {
diff --git a/test/_e2e/cmd_list_test.go b/test/_e2e/cmd_list_test.go
index 55e8d79e..d2e448cb 100644
--- a/test/_e2e/cmd_list_test.go
+++ b/test/_e2e/cmd_list_test.go
@@ -13,7 +13,7 @@ func List(t *testing.T, knFunc *TestShellCmdRunner, project FunctionTestProject)
 	}
 	isProjectPresent := strings.Contains(result.Stdout, project.FunctionName)
 	if project.IsDeployed && !isProjectPresent {
-		 t.Fatal("Deployed project expected")
+		t.Fatal("Deployed project expected")
 	}
 	if !project.IsDeployed && isProjectPresent {
 		t.Fatal("Project is not expected to appear in list output")
diff --git a/test/_e2e/config.go b/test/_e2e/config.go
index 2498e85a..ce62c1a3 100644
--- a/test/_e2e/config.go
+++ b/test/_e2e/config.go
@@ -7,7 +7,7 @@ import (
 
 // Intended to provide setup configuration for E2E tests
 const (
-	defaultRegistry = "localhost:5000/user"
+	defaultRegistry        = "localhost:5000/user"
 	testTemplateRepository = "http://github.com/boson-project/test-templates.git" //nolint:varcheck,deadcode
 )
 
diff --git a/test/_e2e/e2e_remote_repository_test.go b/test/_e2e/e2e_remote_repository_test.go
index 0dd053eb..4654880a 100644
--- a/test/_e2e/e2e_remote_repository_test.go
+++ b/test/_e2e/e2e_remote_repository_test.go
@@ -34,7 +34,7 @@ func TestRemoteRepository(t *testing.T) {
 	defer Delete(t, knFunc, &project)
 	ReadyCheck(t, knFunc, project)
 
-	functionRespValidator := FunctionHttpResponsivenessValidator{ runtime: "go", targetUrl: "%v", expects: "REMOTE_VALID" }
+	functionRespValidator := FunctionHttpResponsivenessValidator{runtime: "go", targetUrl: "%v", expects: "REMOTE_VALID"}
 	functionRespValidator.Validate(t, project)
 
 }
diff --git a/test/_e2e/main_test.go b/test/_e2e/main_test.go
index dac201de..97381161 100644
--- a/test/_e2e/main_test.go
+++ b/test/_e2e/main_test.go
@@ -13,7 +13,7 @@ import (
 	"testing"
 )
 
-func TestMain (t *testing.M) {
+func TestMain(t *testing.M) {
 
 	if GetRegistry() == defaultRegistry {
 		err := patchOrCreateDockerConfigFile()
@@ -76,7 +76,7 @@ func updateConfigAuth(dockerConfigFile string) error {
 		return err
 	}
 	content := string(bcontent)
-	if !strings.Contains(content, strings.Split(defaultRegistry,"/")[0]) {
+	if !strings.Contains(content, strings.Split(defaultRegistry, "/")[0]) {
 		// default registry is not present on .docker/config.json, so let's add it
 		log.Println("Updating ./docker/config.json file with default registry authentication.")
 		exp := regexp.MustCompile(`"auths"[\s]*?[:][\s]*?{`)
@@ -86,14 +86,14 @@ func updateConfigAuth(dockerConfigFile string) error {
 		},`))
 
 		// Replace file content
-		_ = os.Rename(dockerConfigFile, dockerConfigFile + ".e2e")
+		_ = os.Rename(dockerConfigFile, dockerConfigFile+".e2e")
 		err := createConfigAuth(dockerConfigFile, string(newContent))
 		if err != nil {
 			// rollback config file
-			_ = os.Rename(dockerConfigFile + ".e2e", dockerConfigFile)
+			_ = os.Rename(dockerConfigFile+".e2e", dockerConfigFile)
 			return err
 		}
 		_ = os.Remove(dockerConfigFile + ".e2e")
 	}
 	return nil
-}
\ No newline at end of file
+}
diff --git a/test/_e2e/ready_check_test.go b/test/_e2e/ready_check_test.go
index dfff1acd..9e8c34b7 100644
--- a/test/_e2e/ready_check_test.go
+++ b/test/_e2e/ready_check_test.go
@@ -1,16 +1,17 @@
 package e2e
 
 import (
-	"k8s.io/apimachinery/pkg/util/wait"
 	"regexp"
 	"testing"
 	"time"
+
+	"k8s.io/apimachinery/pkg/util/wait"
 )
 
 // ReadyCheck waits deployed function to report as ready.
 func ReadyCheck(t *testing.T, knFunc *TestShellCmdRunner, project FunctionTestProject) {
 	expr := regexp.MustCompile("\n" + project.FunctionName + " .*True")
-	err := wait.PollImmediate(5 * time.Second, 1 * time.Minute, func() (done bool, err error) {
+	err := wait.PollImmediate(5*time.Second, 1*time.Minute, func() (done bool, err error) {
 		result := knFunc.Exec("list")
 		return result.Error == nil && expr.Match([]byte(result.Stdout)), result.Error
 	})
diff --git a/test/_e2e/shell_cmd_runner.go b/test/_e2e/shell_cmd_runner.go
index 96738230..5ced584a 100644
--- a/test/_e2e/shell_cmd_runner.go
+++ b/test/_e2e/shell_cmd_runner.go
@@ -34,7 +34,7 @@ type TestShellCmdRunner struct {
 type TestShellCmdResult struct {
 	Stdout string
 	Stderr string
-	Error error
+	Error  error
 }
 
 func (r TestShellCmdResult) Dump(t *testing.T) {
@@ -73,7 +73,6 @@ func (f *TestShellCmdRunner) FromDir(dir string) *TestShellCmdRunner {
 	return f
 }
 
-
 // Exec invokes go exec library and runs a shell command combining the binary args with args from method signature
 func (f *TestShellCmdRunner) Exec(args ...string) TestShellCmdResult {
 	finalArgs := f.BinaryArgs
@@ -101,7 +100,7 @@ func (f *TestShellCmdRunner) Exec(args ...string) TestShellCmdResult {
 	result := TestShellCmdResult{
 		Stdout: stdout.String(),
 		Stderr: stderr.String(),
-		Error: err,
+		Error:  err,
 	}
 
 	if err == nil && f.ShouldDumpOnSuccess {
diff --git a/test/_e2e/trigger_http_test.go b/test/_e2e/trigger_http_test.go
index 050c1bb6..714c15c1 100644
--- a/test/_e2e/trigger_http_test.go
+++ b/test/_e2e/trigger_http_test.go
@@ -82,11 +82,11 @@ var defaultFunctionsHttpValidators = []FunctionHttpResponsivenessValidator{
 		targetUrl: "%s/health/readiness",
 	},
 	{runtime: "typescript",
-		targetUrl: "%s",
-		method: "POST",
+		targetUrl:   "%s",
+		method:      "POST",
 		contentType: "application/json",
-		bodyData: `{"message":"hello"}`,
-		expects: `{"message":"hello"}`,
+		bodyData:    `{"message":"hello"}`,
+		expects:     `{"message":"hello"}`,
 	},
 }
 
diff --git a/testdata/repositories/customProvider/go/customTemplate/custom.go b/testdata/repositories/customProvider/go/customTemplate/custom.go
index e69de29b..85544860 100644
--- a/testdata/repositories/customProvider/go/customTemplate/custom.go
+++ b/testdata/repositories/customProvider/go/customTemplate/custom.go
@@ -0,0 +1,1 @@
+package custom
diff --git a/testdata/repositories/repositoryTests/go/custom/custom.go b/testdata/repositories/repositoryTests/go/custom/custom.go
index e69de29b..85544860 100644
--- a/testdata/repositories/repositoryTests/go/custom/custom.go
+++ b/testdata/repositories/repositoryTests/go/custom/custom.go
@@ -0,0 +1,1 @@
+package custom