From b0b6dbeb1b0afa02b9dabd27fefdde7b7f30b1b3 Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Sun, 6 Oct 2013 08:47:52 -0700 Subject: [PATCH] switch to if --- tools/generate.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/generate.go b/tools/generate.go index 22607e2..09b9ea9 100644 --- a/tools/generate.go +++ b/tools/generate.go @@ -230,10 +230,9 @@ func parseExamples() []*Example { example.Segs = make([][]*Seg, 0) sourcePaths := mustGlob("examples/" + exampleId + "/*") for _, sourcePath := range sourcePaths { - switch strings.HasSuffix(sourcePath, ".hash") { - case true: + if strings.HasSuffix(sourcePath, ".hash") { example.GoCodeHash, example.UrlHash = parseHashFile(sourcePath) - default: + } else { sourceSegs, filecontents := parseAndRenderSegs(sourcePath) if filecontents != "" { example.GoCode = filecontents