summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/commands.go11
-rw-r--r--commands/hugo.go14
-rw-r--r--commands/list.go1
-rw-r--r--commands/new.go2
-rw-r--r--commands/new_content_test.go1
-rw-r--r--commands/release.go5
-rw-r--r--commands/server.go3
7 files changed, 0 insertions, 37 deletions
diff --git a/commands/commands.go b/commands/commands.go
index 2431e5500..aad47abcd 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -75,22 +75,11 @@ func newBuilderCmd(cmd *cobra.Command) *baseBuilderCmd {
return bcmd
}
-// TODO(bep) cli refactor need root?
func (c *baseCmd) flagsToConfig(cfg config.Provider) {
initializeFlags(c.cmd, cfg)
}
type hugoCmd struct {
-
- //cacheDir string
- //contentDir string
- //layoutDir string
- //destination string
- //theme string
- //themesDir string
- //logI18nWarnings bool
- //disableKinds []string
-
*baseBuilderCmd
}
diff --git a/commands/hugo.go b/commands/hugo.go
index 35b18ae99..4639c0f3b 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -53,20 +53,6 @@ import (
// TODO(bep) cli refactor consider a exported Hugo() method to fix the API
-// Hugo represents the Hugo sites to build. This variable is exported as it
-// is used by at least one external library (the Hugo caddy plugin). We should
-// provide a cleaner external API, but until then, this is it.
-// TODO(bep) cli refactor remove this
-//var Hugo *hugolib.HugoSites
-
-// Reset resets Hugo ready for a new full build. This is mainly only useful
-// for benchmark testing etc. via the CLI commands.
-// TODO(bep) cli refactor check usage
-func Reset() error {
- //Hugo = nil
- return nil
-}
-
// Execute adds all child commands to the root command HugoCmd and sets flags appropriately.
func Execute() {
hugoCmd := newHugoCompleteCmd()
diff --git a/commands/list.go b/commands/list.go
index cf31f2bb4..57a92082c 100644
--- a/commands/list.go
+++ b/commands/list.go
@@ -150,7 +150,6 @@ expired.`,
},
)
- // TODO(bep) cli refactor
cc.cmd.PersistentFlags().StringVarP(&cc.source, "source", "s", "", "filesystem path to read files relative from")
cc.cmd.PersistentFlags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{})
diff --git a/commands/new.go b/commands/new.go
index c78c00bde..c088dca9b 100644
--- a/commands/new.go
+++ b/commands/new.go
@@ -53,7 +53,6 @@ If archetypes are provided in your theme or site, they will be used.`,
})
cc.cmd.Flags().StringVarP(&cc.contentType, "kind", "k", "", "content type to create")
- // TODO(bep) cli refactor
cc.cmd.PersistentFlags().StringVarP(&cc.source, "source", "s", "", "filesystem path to read files relative from")
cc.cmd.PersistentFlags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{})
cc.cmd.Flags().StringVar(&cc.contentEditor, "editor", "", "edit new content with this editor, if provided")
@@ -169,7 +168,6 @@ func touchFile(fs afero.Fs, x ...string) {
}
}
-// TODO(bep) cli refactor => method
func newContentPathSection(path string) (string, string) {
// Forward slashes is used in all examples. Convert if needed.
// Issue #1133
diff --git a/commands/new_content_test.go b/commands/new_content_test.go
index 212b0ade1..364e0f783 100644
--- a/commands/new_content_test.go
+++ b/commands/new_content_test.go
@@ -48,7 +48,6 @@ func checkNewSiteInited(fs *hugofs.Fs, basepath string, t *testing.T) {
}
func TestDoNewSite(t *testing.T) {
- // TODO(bep) cli refactor
n := newNewSiteCmd()
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
diff --git a/commands/release.go b/commands/release.go
index 1846be00d..a95697e49 100644
--- a/commands/release.go
+++ b/commands/release.go
@@ -22,11 +22,6 @@ import (
"github.com/spf13/cobra"
)
-func init() {
- // TODO(bep) cli refactor
- //HugoCmd.AddCommand(createReleaser().cmd)
-}
-
type releaseCommandeer struct {
cmd *cobra.Command
diff --git a/commands/server.go b/commands/server.go
index 5500526e8..1747e17ab 100644
--- a/commands/server.go
+++ b/commands/server.go
@@ -85,7 +85,6 @@ of a second, you will be able to save and see your changes nearly instantly.`,
RunE: cc.server,
})
- // TODO(bep) cli refactor fields vs strings
cc.cmd.Flags().IntVarP(&cc.serverPort, "port", "p", 1313, "port on which the server will listen")
cc.cmd.Flags().IntVar(&cc.liveReloadPort, "liveReloadPort", -1, "port for live reloading (i.e. 443 in HTTPS proxy situations)")
cc.cmd.Flags().StringVarP(&cc.serverInterface, "bind", "", "127.0.0.1", "interface to which the server will bind")
@@ -230,7 +229,6 @@ func (s *serverCmd) server(cmd *cobra.Command, args []string) error {
}
c, err := initializeConfig(true, &s.hugoBuilderCommon, s, cfgInit)
- // TODO(bep) cli refactor
if err != nil {
return err
}
@@ -349,7 +347,6 @@ func (f *fileServer) createEndpoint(i int) (*http.ServeMux, string, string, erro
return mu, u.String(), endpoint, nil
}
-// TODO(bep) cli refactor
func (c *commandeer) serve(s *serverCmd) error {
isMultiHost := c.hugo.IsMultihost()