aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-12-18 17:41:15 +0100
committerBjørn Erik Pedersen <[email protected]>2023-12-18 19:51:26 +0100
commit8adba648cc130a97d2c814c65aa8396044c251fd (patch)
tree95415853e28ee83e0342cc55944f3bc16d746f4f /modules
parent6f13430d4a3b0d8b196f13958fbfb6478be1f3aa (diff)
downloadhugo-8adba648cc130a97d2c814c65aa8396044c251fd.tar.gz
hugo-8adba648cc130a97d2c814c65aa8396044c251fd.zip
all: Remove unused code
Using x/tools/cmd/deadcode
Diffstat (limited to 'modules')
-rw-r--r--modules/collect.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/modules/collect.go b/modules/collect.go
index 5b5418bcd..6c47bde5c 100644
--- a/modules/collect.go
+++ b/modules/collect.go
@@ -15,6 +15,7 @@ package modules
import (
"bufio"
+ "errors"
"fmt"
"os"
"path/filepath"
@@ -37,8 +38,6 @@ import (
"github.com/rogpeppe/go-internal/module"
- "errors"
-
"github.com/gohugoio/hugo/config"
"github.com/spf13/afero"
)
@@ -47,11 +46,6 @@ var ErrNotExist = errors.New("module does not exist")
const vendorModulesFilename = "modules.txt"
-// IsNotExist returns whether an error means that a module could not be found.
-func IsNotExist(err error) bool {
- return errors.Is(err, os.ErrNotExist)
-}
-
func (h *Client) Collect() (ModulesConfig, error) {
mc, coll := h.collect(true)
if coll.err != nil {
@@ -124,7 +118,6 @@ func (m ModulesConfig) HasConfigFile() bool {
if len(mod.ConfigFilenames()) > 0 {
return true
}
-
}
return false
}
@@ -220,7 +213,6 @@ func (c *collector) getVendoredDir(path string) (vendoredModule, bool) {
}
func (c *collector) add(owner *moduleAdapter, moduleImport Import) (*moduleAdapter, error) {
-
var (
mod *goModule
moduleDir string
@@ -669,7 +661,6 @@ func (c *collector) normalizeMounts(owner *moduleAdapter, mounts []Mount) ([]Mou
} else {
continue
}
-
}
// Verify that target points to one of the predefined component dirs