Skip to content

Commit

Permalink
Hide unreleased docs (#2938)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgagniere authored Nov 15, 2024
1 parent bf57c84 commit 6dd6eb5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/docs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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
Expand Down

0 comments on commit 6dd6eb5

Please sign in to comment.