mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	all: Run gofumpt -l -w .
This commit is contained in:
		
							
								
								
									
										4
									
								
								cache/filecache/filecache_config.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								cache/filecache/filecache_config.go
									
									
									
									
										vendored
									
									
								
							@@ -15,6 +15,7 @@
 | 
			
		||||
package filecache
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"errors"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"path"
 | 
			
		||||
	"path/filepath"
 | 
			
		||||
@@ -24,8 +25,6 @@ import (
 | 
			
		||||
	"github.com/gohugoio/hugo/common/maps"
 | 
			
		||||
	"github.com/gohugoio/hugo/config"
 | 
			
		||||
 | 
			
		||||
	"errors"
 | 
			
		||||
 | 
			
		||||
	"github.com/mitchellh/mapstructure"
 | 
			
		||||
	"github.com/spf13/afero"
 | 
			
		||||
)
 | 
			
		||||
@@ -225,7 +224,6 @@ func DecodeConfig(fs afero.Fs, bcfg config.BaseConfig, m map[string]any) (Config
 | 
			
		||||
 | 
			
		||||
// Resolves :resourceDir => /myproject/resources etc., :cacheDir => ...
 | 
			
		||||
func resolveDirPlaceholder(fs afero.Fs, bcfg config.BaseConfig, placeholder string) (cacheDir string, isResource bool, err error) {
 | 
			
		||||
 | 
			
		||||
	switch strings.ToLower(placeholder) {
 | 
			
		||||
	case ":resourcedir":
 | 
			
		||||
		return "", true, nil
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								cache/filecache/filecache_pruner.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								cache/filecache/filecache_pruner.go
									
									
									
									
										vendored
									
									
								
							@@ -60,7 +60,6 @@ func (c *Cache) Prune(force bool) (int, error) {
 | 
			
		||||
	counter := 0
 | 
			
		||||
 | 
			
		||||
	err := afero.Walk(c.Fs, "", func(name string, info os.FileInfo, err error) error {
 | 
			
		||||
 | 
			
		||||
		if info == nil {
 | 
			
		||||
			return nil
 | 
			
		||||
		}
 | 
			
		||||
@@ -69,7 +68,6 @@ func (c *Cache) Prune(force bool) (int, error) {
 | 
			
		||||
 | 
			
		||||
		if info.IsDir() {
 | 
			
		||||
			f, err := c.Fs.Open(name)
 | 
			
		||||
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				// This cache dir may not exist.
 | 
			
		||||
				return nil
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user