aboutsummaryrefslogtreecommitdiffhomepage
path: root/deploy
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-12-02 13:23:25 +0100
committerBjørn Erik Pedersen <[email protected]>2020-12-03 13:12:58 +0100
commitd90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch)
tree7b1b14464eefec1188ca2eed53c64e4823453cc9 /deploy
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
downloadhugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz
hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'deploy')
-rw-r--r--deploy/deploy.go3
-rw-r--r--deploy/deployConfig.go1
-rw-r--r--deploy/deploy_test.go6
3 files changed, 5 insertions, 5 deletions
diff --git a/deploy/deploy.go b/deploy/deploy.go
index 0c793bca0..1aaae5aa7 100644
--- a/deploy/deploy.go
+++ b/deploy/deploy.go
@@ -466,7 +466,7 @@ func (lf *localFile) MD5() []byte {
// knownHiddenDirectory checks if the specified name is a well known
// hidden directory.
func knownHiddenDirectory(name string) bool {
- var knownDirectories = []string{
+ knownDirectories := []string{
".well-known",
}
@@ -697,7 +697,6 @@ func findDiffs(localFiles map[string]*localFile, remoteFiles map[string]*blob.Li
//
// The subslices are sorted by Local.SlashPath.
func applyOrdering(ordering []*regexp.Regexp, uploads []*fileToUpload) [][]*fileToUpload {
-
// Sort the whole slice by Local.SlashPath first.
sort.Slice(uploads, func(i, j int) bool { return uploads[i].Local.SlashPath < uploads[j].Local.SlashPath })
diff --git a/deploy/deployConfig.go b/deploy/deployConfig.go
index d4f78011e..443c5901a 100644
--- a/deploy/deployConfig.go
+++ b/deploy/deployConfig.go
@@ -112,7 +112,6 @@ func (m *matcher) Matches(path string) bool {
// decode creates a config from a given Hugo configuration.
func decodeConfig(cfg config.Provider) (deployConfig, error) {
-
var (
mediaTypesConfig []map[string]interface{}
dcfg deployConfig
diff --git a/deploy/deploy_test.go b/deploy/deploy_test.go
index 987c472ca..264ca9f9e 100644
--- a/deploy/deploy_test.go
+++ b/deploy/deploy_test.go
@@ -211,7 +211,6 @@ func TestFindDiffs(t *testing.T) {
}
func TestWalkLocal(t *testing.T) {
-
tests := map[string]struct {
Given []string
Expect []string
@@ -355,7 +354,10 @@ func TestLocalFile(t *testing.T) {
MediaTypesConfig: []map[string]interface{}{
{
"hugo/custom": map[string]interface{}{
- "suffixes": []string{"hugo"}}}},
+ "suffixes": []string{"hugo"},
+ },
+ },
+ },
WantContent: contentBytes,
WantSize: contentLen,
WantMD5: contentMD5[:],