From 6dd6eb51d865c4ac7228bf18be39edcd71e9a581 Mon Sep 17 00:00:00 2001 From: Steven Gagniere <108363707+sgagniere@users.noreply.github.com> Date: Thu, 14 Nov 2024 20:29:40 -0800 Subject: [PATCH] Hide unreleased docs (#2938) --- cmd/docs/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/docs/main.go b/cmd/docs/main.go index e668282931..88356b429c 100644 --- a/cmd/docs/main.go +++ b/cmd/docs/main.go @@ -62,12 +62,14 @@ func main() { panic(err) } + removeUnreleasedCommands("custom-code-logging") + if err := os.Setenv("HOME", home); err != nil { panic(err) } } -func removeUnreleasedCommands(command string) { //nolint:unused +func removeUnreleasedCommands(command string) { subcommands := strings.Split(command, " ") line := fmt.Sprintf(`\s{3}%s/index\n`, subcommands[len(subcommands)-1]) @@ -94,7 +96,7 @@ func removeUnreleasedCommands(command string) { //nolint:unused } } -func removeLineFromFile(line, file string) error { //nolint:unused +func removeLineFromFile(line, file string) error { out, err := os.ReadFile(file) if err != nil { return err