shithub: hugo

Download patch

ref: 8fa871a05f46295beef1f460bca28cb21ce42d2b
parent: 766c82a6bbf4423a037beb2b1967f720080e4658
author: Albert <[email protected]>
date: Thu Oct 13 09:51:16 EDT 2016

all: Remove dead code


--- a/hugolib/shortcodeparser.go
+++ b/hugolib/shortcodeparser.go
@@ -114,17 +114,6 @@
 
 type itemType int
 
-// named params in shortcodes
-type namedParam struct {
-	name  string
-	value string
-}
-
-// for testing
-func (np namedParam) String() string {
-	return fmt.Sprintf("%s=%s", np.name, np.value)
-}
-
 const (
 	tError itemType = iota
 	tEOF
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -1012,14 +1012,6 @@
 	return helpers.AbsPathify(s.themeDir())
 }
 
-func (s *Site) isThemeDirEvent(e fsnotify.Event) bool {
-	return s.getThemeDir(e.Name) != ""
-}
-
-func (s *Site) getThemeDir(path string) string {
-	return getRealDir(s.absThemeDir(), path)
-}
-
 func (s *Site) layoutDir() string {
 	return viper.GetString("LayoutDir")
 }
@@ -1768,7 +1760,6 @@
 	}
 
 	if s.Info.preserveTaxonomyNames {
-		key = helpers.MakePathSanitized(key)
 		// keep as is in the title
 		n.Title = t.key
 	} else {
--- a/hugolib/site_show_plan_test.go
+++ b/hugolib/site_show_plan_test.go
@@ -43,7 +43,6 @@
 }
 
 func checkShowPlanExpected(t *testing.T, s *Site, expected string) {
-
 	out := new(bytes.Buffer)
 	if err := s.ShowPlan(out); err != nil {
 		t.Fatalf("ShowPlan unexpectedly returned an error: %s", err)
--- a/hugolib/site_url_test.go
+++ b/hugolib/site_url_test.go
@@ -23,7 +23,6 @@
 
 	"github.com/spf13/hugo/hugofs"
 	"github.com/spf13/hugo/source"
-	"github.com/spf13/hugo/target"
 	"github.com/spf13/viper"
 )
 
@@ -42,17 +41,6 @@
 	if err != nil {
 		panic(err)
 	}
-}
-
-type InMemoryAliasTarget struct {
-	target.HTMLRedirectAlias
-	files map[string][]byte
-}
-
-func (t *InMemoryAliasTarget) Publish(label string, permalink template.HTML) (err error) {
-	f, _ := t.Translate(label)
-	t.files[f] = []byte("--dummy text--")
-	return
 }
 
 var urlFakeSource = []source.ByteSource{