summaryrefslogtreecommitdiffhomepage
path: root/helpers
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-10-21 11:17:48 +0200
committerBjørn Erik Pedersen <[email protected]>2020-10-22 09:09:29 +0200
commitfdfa4a5fe62232f65f1dd8d6fe0c500374228788 (patch)
treeb804e91506a7f3c58690c6fd774b28f95184d5dc /helpers
parent8cbe2bbfad6aa4de267921e24e166d4addf47040 (diff)
downloadhugo-fdfa4a5fe62232f65f1dd8d6fe0c500374228788.tar.gz
hugo-fdfa4a5fe62232f65f1dd8d6fe0c500374228788.zip
Allow getJSON errors to be ignored
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing). Fixes #7866
Diffstat (limited to 'helpers')
-rw-r--r--helpers/content.go2
-rw-r--r--helpers/pathspec.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/helpers/content.go b/helpers/content.go
index 5eeca88b6..c59e41a8c 100644
--- a/helpers/content.go
+++ b/helpers/content.go
@@ -65,7 +65,7 @@ type ContentSpec struct {
// NewContentSpec returns a ContentSpec initialized
// with the appropriate fields from the given config.Provider.
-func NewContentSpec(cfg config.Provider, logger *loggers.Logger, contentFs afero.Fs) (*ContentSpec, error) {
+func NewContentSpec(cfg config.Provider, logger loggers.Logger, contentFs afero.Fs) (*ContentSpec, error) {
spec := &ContentSpec{
summaryLength: cfg.GetInt("summaryLength"),
diff --git a/helpers/pathspec.go b/helpers/pathspec.go
index d61757b3d..557261f1c 100644
--- a/helpers/pathspec.go
+++ b/helpers/pathspec.go
@@ -38,13 +38,13 @@ type PathSpec struct {
}
// NewPathSpec creats a new PathSpec from the given filesystems and language.
-func NewPathSpec(fs *hugofs.Fs, cfg config.Provider, logger *loggers.Logger) (*PathSpec, error) {
+func NewPathSpec(fs *hugofs.Fs, cfg config.Provider, logger loggers.Logger) (*PathSpec, error) {
return NewPathSpecWithBaseBaseFsProvided(fs, cfg, logger, nil)
}
// NewPathSpecWithBaseBaseFsProvided creats a new PathSpec from the given filesystems and language.
// If an existing BaseFs is provided, parts of that is reused.
-func NewPathSpecWithBaseBaseFsProvided(fs *hugofs.Fs, cfg config.Provider, logger *loggers.Logger, baseBaseFs *filesystems.BaseFs) (*PathSpec, error) {
+func NewPathSpecWithBaseBaseFsProvided(fs *hugofs.Fs, cfg config.Provider, logger loggers.Logger, baseBaseFs *filesystems.BaseFs) (*PathSpec, error) {
p, err := paths.New(fs, cfg)
if err != nil {