diff options
Diffstat (limited to 'commands/import_jekyll.go')
-rw-r--r-- | commands/import_jekyll.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/commands/import_jekyll.go b/commands/import_jekyll.go index b9ea56d4b..4f17b2e39 100644 --- a/commands/import_jekyll.go +++ b/commands/import_jekyll.go @@ -235,7 +235,7 @@ func (i *importCmd) createSiteFromJekyll(jekyllRoot, targetDir string, jekyllPos return nil } -func (i *importCmd) loadJekyllConfig(fs afero.Fs, jekyllRoot string) map[string]interface{} { +func (i *importCmd) loadJekyllConfig(fs afero.Fs, jekyllRoot string) map[string]any { path := filepath.Join(jekyllRoot, "_config.yml") exists, err := helpers.Exists(path, fs) @@ -265,7 +265,7 @@ func (i *importCmd) loadJekyllConfig(fs afero.Fs, jekyllRoot string) map[string] return c } -func (i *importCmd) createConfigFromJekyll(fs afero.Fs, inpath string, kind metadecoders.Format, jekyllConfig map[string]interface{}) (err error) { +func (i *importCmd) createConfigFromJekyll(fs afero.Fs, inpath string, kind metadecoders.Format, jekyllConfig map[string]any) (err error) { title := "My New Hugo Site" baseURL := "http://example.org/" @@ -285,7 +285,7 @@ func (i *importCmd) createConfigFromJekyll(fs afero.Fs, inpath string, kind meta } } - in := map[string]interface{}{ + in := map[string]any{ "baseURL": baseURL, "title": title, "languageCode": "en-us", @@ -423,7 +423,7 @@ func convertJekyllPost(path, relPath, targetDir string, draft bool) error { return nil } -func convertJekyllMetaData(m interface{}, postName string, postDate time.Time, draft bool) (interface{}, error) { +func convertJekyllMetaData(m any, postName string, postDate time.Time, draft bool) (any, error) { metadata, err := maps.ToStringMapE(m) if err != nil { return nil, err @@ -475,7 +475,7 @@ func convertJekyllMetaData(m interface{}, postName string, postDate time.Time, d return metadata, nil } -func convertJekyllContent(m interface{}, content string) (string, error) { +func convertJekyllContent(m any, content string) (string, error) { metadata, _ := maps.ToStringMapE(m) lines := strings.Split(content, "\n") |