From 651d93ee8dabeb8291b269bf15c5f0dcb131b826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Mon, 8 Apr 2024 11:15:56 +0200 Subject: [PATCH] [chore] Add godoc target --- CONTRIBUTING.md | 7 +------ Makefile | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7847b459088..777d3a78a4c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -191,12 +191,7 @@ Prefer using [Examples](https://pkg.go.dev/testing#hdr-Examples) instead of putting code snippets in Go doc comments. In some cases, you can even create [Testable Examples](https://go.dev/blog/examples). -You can install and run a "local Go Doc site" in the following way: - - ```sh - go install golang.org/x/pkgsite/cmd/pkgsite@latest - pkgsite - ``` +You can install and run a local pkg.go.dev (Go Doc) website with `make godoc`. [`go.opentelemetry.io/otel/metric`](https://pkg.go.dev/go.opentelemetry.io/otel/metric) is an example of a very well-documented package. diff --git a/Makefile b/Makefile index 8b3d8816ea0..7dbbf3bfdc3 100644 --- a/Makefile +++ b/Makefile @@ -310,3 +310,8 @@ lint-markdown: .PHONY: verify-readmes verify-readmes: ./verify_readmes.sh + +.PHONY: godoc +godoc: + go install golang.org/x/pkgsite/cmd/pkgsite@latest + pkgsite