}
if site.Source == nil {
- panic(fmt.Sprintf("site.Source not set"))
+ panic("site.Source not set")
}
if len(site.Source.Files()) < 1 {
return fmt.Errorf("No source files found")
package source
-import (
- "bytes"
- "fmt"
-)
+import "bytes"
type ByteSource struct {
Name string
}
func (b *ByteSource) String() string {
- return fmt.Sprintf("%s %s", b.Name, string(b.Content))
+ return b.Name + " " + string(b.Content)
}
type InMemorySource struct {
package target
import (
- "fmt"
"html/template"
"io"
"path/filepath"
name := filename(file)
if pp.UglyURLs || file == "index.html" || (isRoot && file == "404.html") {
- return filepath.Join(dir, fmt.Sprintf("%s%s", name, ext)), nil
+ return filepath.Join(dir, name+ext), nil
}
- return filepath.Join(dir, name, fmt.Sprintf("index%s", ext)), nil
+ return filepath.Join(dir, name, "index"+ext), nil
}
func (pp *PagePub) extension(ext string) string {
package tpl
import (
- "fmt"
-
"github.com/nicksnyder/go-i18n/i18n/bundle"
"github.com/spf13/hugo/helpers"
jww "github.com/spf13/jwalterweatherman"
i18nWarningLogger.Printf("i18n|MISSING_TRANSLATION|%s|%s", currentLang, translationID)
}
if enableMissingTranslationPlaceholders {
- return fmt.Sprintf("[i18n] %s", translationID)
+ return "[i18n] " + translationID
}
if defaultT != nil {
if translated := defaultT(translationID, args...); translated != translationID {