Skip to content

Commit

Permalink
[TT-9423] Add godoc taskfile (#5303)
Browse files Browse the repository at this point in the history
https://tyktech.atlassian.net/browse/TT-9423

Run it with task -t `.taskfiles/godoc/Taskfile.yml`, or go into
`.taskfiles/godoc` and run `task`.

Co-authored-by: Tit Petric <tit@tyk.io>
(cherry picked from commit 4def67e)
  • Loading branch information
titpetric authored and Tyk Bot committed Jul 12, 2023
1 parent c47c56f commit 07da394
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .taskfiles/godoc/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
version: "3"

tasks:
default:
desc: "Run godoc on all packages"
dir: ../..
vars:
package:
sh: go list .
packages:
sh: go list ./... | sed -e 's|{{.package}}|.|g'
silent: true
cmds:
- |
set -e;
{{- range $i, $package := .packages | splitLines -}}
go doc {{ $package }}
{{ end -}}

0 comments on commit 07da394

Please sign in to comment.