From d38dac729dc5e4180e0e029a1b0bcf7b0a1e84fd Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Mon, 18 Feb 2019 13:44:53 -0500 Subject: [PATCH] godoc: remove unused CLI-only identifiers This is a followup to CL 141397, which removed CLI support from the godoc command for golang/go#25443. This change removes a few more CLI-related fields from Presentation type, which are now unused. It also removes the unused and no longer documented (since CL 143077) NoHTML PageInfoMode. Updates golang/go#25443 Change-Id: Ia4147515052889570e2f050e3c2394689d3c5d6c Reviewed-on: https://go-review.googlesource.com/c/162982 Run-TryBot: Dmitri Shuralyov TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick Reviewed-by: Agniva De Sarker --- godoc/pres.go | 7 ------- godoc/server.go | 2 -- 2 files changed, 9 deletions(-) diff --git a/godoc/pres.go b/godoc/pres.go index 800937af48..7cedcb54e1 100644 --- a/godoc/pres.go +++ b/godoc/pres.go @@ -47,13 +47,6 @@ type Presentation struct { ShowPlayground bool DeclLinks bool - // SrcMode outputs source code instead of documentation in command-line mode. - SrcMode bool - // HTMLMode outputs HTML instead of plain text in command-line mode. - HTMLMode bool - // AllMode includes unexported identifiers in the output in command-line mode. - AllMode bool - // NotesRx optionally specifies a regexp to match // notes to render in the output. NotesRx *regexp.Regexp diff --git a/godoc/server.go b/godoc/server.go index 57766a2161..b03e14a6e9 100644 --- a/godoc/server.go +++ b/godoc/server.go @@ -356,7 +356,6 @@ const ( NoFiltering PageInfoMode = 1 << iota // do not filter exports AllMethods // show all embedded methods ShowSource // show source code, do not extract documentation - NoHTML // show result in textual form, do not generate HTML FlatDir // show directory in a flat (non-indented) manner NoTypeAssoc // don't associate consts, vars, and factory functions with types ) @@ -366,7 +365,6 @@ var modeNames = map[string]PageInfoMode{ "all": NoFiltering, "methods": AllMethods, "src": ShowSource, - "text": NoHTML, "flat": FlatDir, }