all: Remove dead code
authorAlbert <albertnigma@gmail.com>
Thu, 13 Oct 2016 11:51:16 +0000 (13:51 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 13 Oct 2016 11:51:16 +0000 (13:51 +0200)
hugolib/shortcodeparser.go
hugolib/site.go
hugolib/site_show_plan_test.go
hugolib/site_url_test.go

index 027d661cae63901e6890eafffa09d6353d52b771..bdbd3ae50abf7bbb05b18ea7521167638f68fd4d 100644 (file)
@@ -114,17 +114,6 @@ func (i item) String() string {
 
 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
index 509c3bc6cfe4b219537ece7cb88b210cff3c7917..73a177f7788008f37153a494e8c807eb87a7d42d 100644 (file)
@@ -1012,14 +1012,6 @@ func (s *Site) absThemeDir() string {
        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 @@ func (s *Site) newTaxonomyNode(prepare bool, t taxRenderInfo, counter int) (*Nod
        }
 
        if s.Info.preserveTaxonomyNames {
-               key = helpers.MakePathSanitized(key)
                // keep as is in the title
                n.Title = t.key
        } else {
index d57d8ab01f4d8bfa2ebcbd8fbc9f509ba9b1bad4..db5bec7b612798204606285127b0f406f783c9e8 100644 (file)
@@ -43,7 +43,6 @@ var fakeSource = []source.ByteSource{
 }
 
 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)
index 522732cc24190f7659bfc91a30b4524baf0f30ad..f53d4492d4934b83dafc1659ee961058ac773c8f 100644 (file)
@@ -23,7 +23,6 @@ import (
 
        "github.com/spf13/hugo/hugofs"
        "github.com/spf13/hugo/source"
-       "github.com/spf13/hugo/target"
        "github.com/spf13/viper"
 )
 
@@ -44,17 +43,6 @@ func must(err error) {
        }
 }
 
-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{
        {Name: filepath.FromSlash("content/blue/doc1.md"), Content: []byte(slugDoc1)},
        {Name: filepath.FromSlash("content/blue/doc2.md"), Content: []byte(slugDoc2)},