ref: 873a6f18851bcda79d562ff6c02e1109e8e31a88
parent: f503d76a3b2719bbb65ab9df5595d0dbc871fae9
author: Bjørn Erik Pedersen <[email protected]>
date: Tue Jun 13 15:07:35 EDT 2017
Run gofmt to get imports in line vs gohugoio/hugo
--- a/commands/convert.go
+++ b/commands/convert.go
@@ -19,10 +19,10 @@
"path/filepath"
"time"
- "github.com/spf13/cast"
- "github.com/spf13/cobra"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
+ "github.com/spf13/cast"
+ "github.com/spf13/cobra"
)
var outputDir string
--- a/commands/gendoc.go
+++ b/commands/gendoc.go
@@ -20,10 +20,10 @@
"strings"
"time"
- "github.com/spf13/cobra"
- "github.com/spf13/cobra/doc"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
+ "github.com/spf13/cobra"
+ "github.com/spf13/cobra/doc"
jww "github.com/spf13/jwalterweatherman"
)
--- a/commands/gendocshelper.go
+++ b/commands/gendocshelper.go
@@ -19,8 +19,8 @@
"os"
"path/filepath"
- "github.com/spf13/cobra"
"github.com/gohugoio/hugo/docshelper"
+ "github.com/spf13/cobra"
)
type genDocsHelper struct {
--- a/commands/genman.go
+++ b/commands/genman.go
@@ -17,10 +17,10 @@
"fmt"
"strings"
- "github.com/spf13/cobra"
- "github.com/spf13/cobra/doc"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
+ "github.com/spf13/cobra"
+ "github.com/spf13/cobra/doc"
jww "github.com/spf13/jwalterweatherman"
)
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -38,9 +38,6 @@
"regexp"
"github.com/fsnotify/fsnotify"
- "github.com/spf13/afero"
- "github.com/spf13/cobra"
- "github.com/spf13/fsync"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugolib"
@@ -47,6 +44,9 @@
"github.com/gohugoio/hugo/livereload"
"github.com/gohugoio/hugo/utils"
"github.com/gohugoio/hugo/watcher"
+ "github.com/spf13/afero"
+ "github.com/spf13/cobra"
+ "github.com/spf13/fsync"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/nitro"
"github.com/spf13/viper"
--- a/commands/import_jekyll.go
+++ b/commands/import_jekyll.go
@@ -25,13 +25,13 @@
"strings"
"time"
- "github.com/spf13/afero"
- "github.com/spf13/cast"
- "github.com/spf13/cobra"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
+ "github.com/spf13/afero"
+ "github.com/spf13/cast"
+ "github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
--- a/commands/list.go
+++ b/commands/list.go
@@ -16,8 +16,8 @@
import (
"path/filepath"
- "github.com/spf13/cobra"
"github.com/gohugoio/hugo/hugolib"
+ "github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
--- a/commands/new.go
+++ b/commands/new.go
@@ -22,13 +22,13 @@
"strings"
"time"
- "github.com/spf13/afero"
- "github.com/spf13/cobra"
"github.com/gohugoio/hugo/create"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
+ "github.com/spf13/afero"
+ "github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
)
--- a/commands/release.go
+++ b/commands/release.go
@@ -16,8 +16,8 @@
package commands
import (
- "github.com/spf13/cobra"
"github.com/gohugoio/hugo/releaser"
+ "github.com/spf13/cobra"
)
func init() {
--- a/commands/server.go
+++ b/commands/server.go
@@ -24,10 +24,10 @@
"strings"
"time"
- "github.com/spf13/afero"
- "github.com/spf13/cobra"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/afero"
+ "github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
--- a/commands/undraft.go
+++ b/commands/undraft.go
@@ -19,8 +19,8 @@
"os"
"time"
- "github.com/spf13/cobra"
"github.com/gohugoio/hugo/parser"
+ "github.com/spf13/cobra"
)
var undraftCmd = &cobra.Command{
--- a/commands/version.go
+++ b/commands/version.go
@@ -20,10 +20,10 @@
"strings"
"time"
- "github.com/kardianos/osext"
- "github.com/spf13/cobra"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugolib"
+ "github.com/kardianos/osext"
+ "github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
--- a/create/content.go
+++ b/create/content.go
@@ -22,11 +22,11 @@
"strings"
"time"
- "github.com/spf13/afero"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
+ "github.com/spf13/afero"
+ "github.com/spf13/cast"
jww "github.com/spf13/jwalterweatherman"
)
--- a/create/content_test.go
+++ b/create/content_test.go
@@ -27,9 +27,9 @@
"github.com/gohugoio/hugo/hugofs"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/create"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/afero"
"github.com/spf13/viper"
"github.com/stretchr/testify/require"
)
--- a/helpers/content.go
+++ b/helpers/content.go
@@ -26,11 +26,11 @@
"unicode/utf8"
"github.com/chaseadamsio/goorgeous"
+ bp "github.com/gohugoio/hugo/bufferpool"
+ "github.com/gohugoio/hugo/config"
"github.com/miekg/mmark"
"github.com/mitchellh/mapstructure"
"github.com/russross/blackfriday"
- bp "github.com/gohugoio/hugo/bufferpool"
- "github.com/gohugoio/hugo/config"
jww "github.com/spf13/jwalterweatherman"
"strings"
--- a/helpers/content_renderer.go
+++ b/helpers/content_renderer.go
@@ -17,9 +17,9 @@
"bytes"
"html"
+ "github.com/gohugoio/hugo/config"
"github.com/miekg/mmark"
"github.com/russross/blackfriday"
- "github.com/gohugoio/hugo/config"
jww "github.com/spf13/jwalterweatherman"
)
--- a/helpers/emoji_test.go
+++ b/helpers/emoji_test.go
@@ -18,8 +18,8 @@
"strings"
"testing"
- "github.com/kyokomi/emoji"
"github.com/gohugoio/hugo/bufferpool"
+ "github.com/kyokomi/emoji"
)
func TestEmojiCustom(t *testing.T) {
--- a/helpers/general.go
+++ b/helpers/general.go
@@ -26,8 +26,8 @@
"unicode"
"unicode/utf8"
- "github.com/spf13/cast"
bp "github.com/gohugoio/hugo/bufferpool"
+ "github.com/spf13/cast"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/pflag"
)
--- a/helpers/language.go
+++ b/helpers/language.go
@@ -18,8 +18,8 @@
"strings"
"sync"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/config"
+ "github.com/spf13/cast"
)
// These are the settings that should only be looked up in the global Viper
--- a/helpers/path_test.go
+++ b/helpers/path_test.go
@@ -29,8 +29,8 @@
"github.com/stretchr/testify/assert"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/hugofs"
+ "github.com/spf13/afero"
"github.com/spf13/viper"
)
--- a/hugofs/fs.go
+++ b/hugofs/fs.go
@@ -15,8 +15,8 @@
package hugofs
import (
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/config"
+ "github.com/spf13/afero"
)
// Os points to an Os Afero file system.
--- a/hugolib/case_insensitive_test.go
+++ b/hugolib/case_insensitive_test.go
@@ -19,9 +19,9 @@
"strings"
"testing"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/hugofs"
+ "github.com/spf13/afero"
"github.com/stretchr/testify/require"
)
--- a/hugolib/config.go
+++ b/hugolib/config.go
@@ -16,8 +16,8 @@
import (
"fmt"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/afero"
"github.com/spf13/viper"
)
--- a/hugolib/disableKinds_test.go
+++ b/hugolib/disableKinds_test.go
@@ -18,8 +18,8 @@
"fmt"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/deps"
+ "github.com/spf13/afero"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
--- a/hugolib/hugo_sites_build_test.go
+++ b/hugolib/hugo_sites_build_test.go
@@ -13,11 +13,11 @@
"github.com/fortytw2/leaktest"
"github.com/fsnotify/fsnotify"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/source"
+ "github.com/spf13/afero"
"github.com/spf13/viper"
"github.com/stretchr/testify/require"
)
--- a/hugolib/multilingual.go
+++ b/hugolib/multilingual.go
@@ -21,9 +21,9 @@
"errors"
"fmt"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/cast"
)
type Multilingual struct {
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -21,10 +21,10 @@
"github.com/bep/gitmap"
- "github.com/mitchellh/mapstructure"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/output"
"github.com/gohugoio/hugo/parser"
+ "github.com/mitchellh/mapstructure"
"html/template"
"io"
@@ -36,9 +36,9 @@
"time"
"unicode/utf8"
- "github.com/spf13/cast"
bp "github.com/gohugoio/hugo/bufferpool"
"github.com/gohugoio/hugo/source"
+ "github.com/spf13/cast"
)
var (
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -25,9 +25,9 @@
"testing"
"time"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/cast"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -37,8 +37,6 @@
"sync/atomic"
"github.com/fsnotify/fsnotify"
- "github.com/spf13/afero"
- "github.com/spf13/cast"
bp "github.com/gohugoio/hugo/bufferpool"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
@@ -47,6 +45,8 @@
"github.com/gohugoio/hugo/source"
"github.com/gohugoio/hugo/tpl"
"github.com/gohugoio/hugo/transform"
+ "github.com/spf13/afero"
+ "github.com/spf13/cast"
"github.com/spf13/nitro"
"github.com/spf13/viper"
)
--- a/hugolib/site_output.go
+++ b/hugolib/site_output.go
@@ -18,10 +18,10 @@
"path"
"strings"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/output"
+ "github.com/spf13/cast"
)
func createSiteOutputFormats(allFormats output.Formats, cfg config.Provider) (map[string]output.Formats, error) {
--- a/hugolib/site_sections.go
+++ b/hugolib/site_sections.go
@@ -19,8 +19,8 @@
"strconv"
"strings"
- radix "github.com/hashicorp/go-immutable-radix"
"github.com/gohugoio/hugo/helpers"
+ radix "github.com/hashicorp/go-immutable-radix"
)
// Deprecated: Use .Site.Home.Sections.
--- a/hugolib/testhelpers_test.go
+++ b/hugolib/testhelpers_test.go
@@ -9,9 +9,9 @@
"fmt"
"strings"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/deps"
+ "github.com/spf13/afero"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/source"
--- a/i18n/i18n.go
+++ b/i18n/i18n.go
@@ -14,9 +14,9 @@
package i18n
import (
- "github.com/nicksnyder/go-i18n/i18n/bundle"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
+ "github.com/nicksnyder/go-i18n/i18n/bundle"
jww "github.com/spf13/jwalterweatherman"
)
--- a/i18n/i18n_test.go
+++ b/i18n/i18n_test.go
@@ -21,8 +21,8 @@
"log"
- "github.com/nicksnyder/go-i18n/i18n/bundle"
"github.com/gohugoio/hugo/config"
+ "github.com/nicksnyder/go-i18n/i18n/bundle"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
"github.com/stretchr/testify/require"
--- a/i18n/translationProvider.go
+++ b/i18n/translationProvider.go
@@ -16,9 +16,9 @@
import (
"fmt"
- "github.com/nicksnyder/go-i18n/i18n/bundle"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/source"
+ "github.com/nicksnyder/go-i18n/i18n/bundle"
)
// TranslationProvider provides translation handling, i.e. loading
--- a/source/filesystem.go
+++ b/source/filesystem.go
@@ -21,8 +21,8 @@
"runtime"
"strings"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/cast"
jww "github.com/spf13/jwalterweatherman"
"golang.org/x/text/unicode/norm"
)
--- a/tpl/collections/collections.go
+++ b/tpl/collections/collections.go
@@ -23,9 +23,9 @@
"strings"
"time"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/cast"
)
// New returns a new instance of the collections-namespaced template functions.
--- a/tpl/collections/sort.go
+++ b/tpl/collections/sort.go
@@ -19,8 +19,8 @@
"sort"
"strings"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/tpl/compare"
+ "github.com/spf13/cast"
)
var comp = compare.New()
--- a/tpl/data/cache.go
+++ b/tpl/data/cache.go
@@ -18,9 +18,9 @@
"net/url"
"sync"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/afero"
)
var cacheMu sync.RWMutex
--- a/tpl/data/resources.go
+++ b/tpl/data/resources.go
@@ -21,9 +21,9 @@
"sync"
"time"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/afero"
jww "github.com/spf13/jwalterweatherman"
)
--- a/tpl/data/resources_test.go
+++ b/tpl/data/resources_test.go
@@ -23,11 +23,11 @@
"testing"
"time"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
+ "github.com/spf13/afero"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
--- a/tpl/images/images.go
+++ b/tpl/images/images.go
@@ -23,8 +23,8 @@
_ "image/jpeg"
_ "image/png"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/deps"
+ "github.com/spf13/cast"
)
// New returns a new instance of the images-namespaced template functions.
--- a/tpl/images/images_test.go
+++ b/tpl/images/images_test.go
@@ -22,10 +22,10 @@
"path/filepath"
"testing"
- "github.com/spf13/afero"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/hugofs"
+ "github.com/spf13/afero"
+ "github.com/spf13/cast"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
--- a/tpl/lang/lang.go
+++ b/tpl/lang/lang.go
@@ -19,8 +19,8 @@
"strconv"
"strings"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/deps"
+ "github.com/spf13/cast"
)
// New returns a new instance of the lang-namespaced template functions.
--- a/tpl/os/os.go
+++ b/tpl/os/os.go
@@ -18,9 +18,9 @@
"fmt"
_os "os"
+ "github.com/gohugoio/hugo/deps"
"github.com/spf13/afero"
"github.com/spf13/cast"
- "github.com/gohugoio/hugo/deps"
)
// New returns a new instance of the os-namespaced template functions.
--- a/tpl/os/os_test.go
+++ b/tpl/os/os_test.go
@@ -18,9 +18,9 @@
"path/filepath"
"testing"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/hugofs"
+ "github.com/spf13/afero"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
--- a/tpl/safe/safe.go
+++ b/tpl/safe/safe.go
@@ -16,8 +16,8 @@
import (
"html/template"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/cast"
)
// New returns a new instance of the safe-namespaced template functions.
--- a/tpl/strings/strings.go
+++ b/tpl/strings/strings.go
@@ -20,9 +20,9 @@
_strings "strings"
"unicode/utf8"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/cast"
)
// New returns a new instance of the strings-namespaced template functions.
--- a/tpl/tplimpl/template.go
+++ b/tpl/tplimpl/template.go
@@ -29,10 +29,10 @@
"path/filepath"
"sync"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/tpl"
+ "github.com/spf13/afero"
)
const (
--- a/tpl/tplimpl/template_funcs_test.go
+++ b/tpl/tplimpl/template_funcs_test.go
@@ -24,7 +24,6 @@
"log"
"os"
- "github.com/spf13/afero"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
@@ -32,6 +31,7 @@
"github.com/gohugoio/hugo/i18n"
"github.com/gohugoio/hugo/tpl"
"github.com/gohugoio/hugo/tpl/internal"
+ "github.com/spf13/afero"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
"github.com/stretchr/testify/require"
--- a/tpl/transform/transform.go
+++ b/tpl/transform/transform.go
@@ -18,9 +18,9 @@
"html"
"html/template"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
+ "github.com/spf13/cast"
)
// New returns a new instance of the transform-namespaced template functions.
--- a/tpl/urls/urls.go
+++ b/tpl/urls/urls.go
@@ -17,8 +17,8 @@
"errors"
"html/template"
- "github.com/spf13/cast"
"github.com/gohugoio/hugo/deps"
+ "github.com/spf13/cast"
)
// New returns a new instance of the urls-namespaced template functions.