Skip to content

Commit

Permalink
Merge pull request #127 from LukeWinikates/make-godoc
Browse files Browse the repository at this point in the history
add make godoc target so new contributors can easily review godoc
  • Loading branch information
keep94 authored Dec 16, 2022
2 parents 2e71c31 + 33d4d16 commit 373ef2f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.PHONY: test godoc

test:
go test -timeout 10m -v -race ./...
go vet ./...
go vet ./...

godoc:
scripts/godoc-install-hint.sh
@echo "\n\nlaunching godoc server. see docs here: http://localhost:6060/pkg/github.com/wavefronthq/wavefront-sdk-go/senders \n\n"
godoc -http=:6060
12 changes: 12 additions & 0 deletions scripts/godoc-install-hint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -eou pipefail

which godoc >/dev/null || (
cat <<-'EOF'
The godoc cli is not installed.
Install godoc somewhere on your $PATH.
For example, if /usr/local/bin is on your $PATH:
GOBIN=/usr/local/bin/ go install golang.org/x/tools/cmd/godoc@latest
EOF
)

0 comments on commit 373ef2f

Please sign in to comment.