func main() { runtime.GOMAXPROCS(runtime.NumCPU()) commands.Execute() if jww.LogCountForLevelsGreaterThanorEqualTo(jww.LevelError) > 0 { os.Exit(-1) } }
func TestRenderWithInvalidTemplate(t *testing.T) { jww.ResetLogCounters() s := newSiteDefaultLang() if err := buildAndRenderSite(s, "missing", templateMissingFunc); err != nil { t.Fatalf("Got build error: %s", err) } if jww.LogCountForLevelsGreaterThanorEqualTo(jww.LevelError) != 1 { t.Fatalf("Expecting the template to log an ERROR") } }